2Checkout integration & "thank you page"

2Checkout integration & "thank you page"

by Peter T -
Number of replies: 22

It is nice that Authorize.net enrolment plugin has been integrated into Moodle, but when I applied for an account with Authorize.net, it would cost $1,500 just to get a merchant account. I'm not sure how most Moodle users can afford to have a merchant account (unless I'm missing something here), but to cut the story short, 2Checkout payment system only costs $49 setup fee so I decided to go with them.

I'm struggling, however to find someone to help me with a 2 Checkout integration and advice on creation of a "thank you page" for tracking enrolments coming from affiliate websites. As I understand, a "thank you page" has to be created when you want to use cookie based affiliate systems.

I've already posted a bid request on Rentacoder.com but noone seems to bid. I'm happy to pay a person with experience in this area. My moodle ver is 1.6.

I hope this post gets some response unlike many in this forum.

Average of ratings: -
In reply to Peter T

Re: 2Checkout integration & "thank you page"

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
> I hope this post gets some response unlike many in this forum

I'm afraid most people answering questions here do it:

a) for free and
b) on their (scarce?) spare time.

I try put my efforts on the questions that I know I can answer and that won't take me a lot of time (scarcity economy in its purest form).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: 2Checkout integration & "thank you page"

by Peter T -

Thank you Iñaki for your comment.

I understand that people here are helpful and do it for the passion rather than for the money. But because it is sometimes hard to get someone for certain jobs I'd like to pay for their time.

Hopefully the right person will read this smile

In reply to Peter T

Re: 2Checkout integration & "thank you page"

by Jiri Zajic -
Hi Peter, I am just finishing something, what is cool, I think. Sender: Clicking on locked course call for payment appears and clicking on proper button the call, incl possible discount by code is emailed to user, with data for payment. Receiver: based on cron we read secured incomming payment page of the bank and enrol the student, sending him the formal invoice. Imagine, it is FOC on the side of the bank. Currently I am not able to prepare Moodle standard autoinstall, it needs some handwork. If you could find similar bank in Australia,....
In reply to Peter T

Re: 2Checkout integration & "thank you page"

by Peter T -

I found this free affiliate software, but I could not set it up and there is no support. I've tried contacting them but got no response. There is a variables file that I was unable to modify. Purposely badly written help is supposed to drive orders to the guys running the website, but for whatever reason I could not get answer from them.

As I said, I will pay for the person who helps me set this up. The script is here: http://www.cosmicperl.com/affiliateclick.shtml. Thanks all.

In reply to Peter T

Re: 2Checkout integration & "thank you page"

by Peter T -

Please, noone is able to help?? Where are all Moodle gurus?

Ok, so at least can anyone PLEASE tell me where is the page a student gets redirected after successful payment has been made from Paypal? That is the page I'm supposed to place a little line of code in for affiliate script to work (to be able to track where the sales leads came from).

In reply to Peter T

Re: 2Checkout integration & "thank you page"

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you are willing to pay for this development (and you said so), then I think a Moodle Partner is the way to go.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: 2Checkout integration & "thank you page"

by Alan Barrett -
I have created and tested a 2checkout enrol plugin for Moodle version 2007021532 (1.8.3 +). I have attached it in a .zip file. README.txt gives instructions on use.
In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

An entry has been  added to the Modules and Plugins database for this 2Checkout plugin at http://moodle.org/mod/data/view.php?d=13&rid=1242

There have been no code changes but the README.txt file has been updated and the plugin has been tested with Moodle 1.9 +

Alan

In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by Richard dos Santos -
Thanks for the great enrollment plugin firstly.

However I am having some trouble with errors I am receiving and cannot find anything helpful on the matter elsewhere.

I have followed the text file instructions, but when a user completes payment and clicks on the "Take me to my good link" which then forwards onto the defined return URL I get an error "key mismatch in POST" with just a continue button displayed that links back to the homepage. The user is not enrolled in the course.

Additionally on a separate error. Before the user clicks on the "Send payment via 2CO" link, just below that an error "Fatal error: Class 'enrolment_plugin_manual' not found in /home/applisential/www/learn/enrol/manual/enrol.html on line 7" displays. I have looked around and it seems related to the manual enrollment plugin which should display an enrollment key field. After doing some searching it says this bug was fixed, however I am using 1.9 and it still appears. I found a fix (http://tracker.moodle.org/browse/MDL-13327;jsessionid=EDBABDC0F326EF4CF6899507E6D3826C) but it didn't solve my problem.

Please advise, thanks in advance.
In reply to Richard dos Santos

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

Unfortunately I am away on holiday and do not have my computer with me. I should have my computer and net access on Monday, if you can wait that long.

The key missmatch happens when the 2Checkout Secret Word and Vendor Account Number do not match the ones entered in Moodle. The Order number and total need also match, but I think they are unlikely not to match.

Hopefully I can tell you more on Monday.

Alan.

In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by Richard dos Santos -
Great, thanks Alan. I will do some digging into the highlighted sections. But would welcome your thoughts when you get back.

Enjoy the holiday in the meanwhile! smile
In reply to Richard dos Santos

Re: 2Checkout integration & "thank you page"

by Richard Standen -

Hi there

Course Merchant (www.coursemerchant.com) is an ecommerce frontend for Moodle that supports 2checkout.  It also supports an affiliate system.

New version of Course Merchant just released that now aggregates purchased course enrollments for students in a single 'My Account' area.

Regards

Richard

In reply to Richard Standen

Re: 2Checkout integration & "thank you page"

by James Phillips -
Does coursemerchant support Japanese or have compatibility with any Japanese payment systems? I e-mailed the coursemerchant people directly about this a couple of months ago but did not receive a reply.

Regards,

James Phillips
In reply to James Phillips

Re: 2Checkout integration & "thank you page"

by Richard dos Santos -
On that regard Course Merchant looks very good however I need to ensure that it supports a payment gateway that allows payment to South African merchants.

I do know that 2CO is not happy to work with South African course providers as I recently had to cancel my 2CO account.
In reply to Richard dos Santos

Re: 2Checkout integration & "thank you page"

by Richard Standen -

Hi there

I am doing some research to see if any of the supported payment processors offer accounts to companies in SA.

The closest I have got so far is this statement on the Secpay website - http://www.secpay.com/secpay/index.php/content/view/full/202.html.

Will contact you direct once I know more.

All the best

Richard

In reply to James Phillips

Re: 2Checkout integration & "thank you page"

by Richard Standen -

Hi James

Course Merchant supports the following languages (not Japanese I'm afraid):

English - US
English - European
French
German
Spanish
Portuguese - S American
Portuguese - European
Dutch
Danish
Swedish
Norwegian
Italian
Polish
Turkish
Croatian
Indonesian
Afrikaans
Romanian
Icelandic
Finnish
Hungarian
Greek
Estonian
Welsh
Czech
Albanian

All the best

Richard

In reply to Richard dos Santos

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

First I will deal with your second problem. Please make following changes and tell me if they solve the second problem.

1) REMOVE the work around in enrol/manual/enrol.html on line 7
I can see the intent of this workaround but cannot see how it would work as the Class 'enrolment_plugin_manual' is not loaded as far as I can see.

2) ADD the following lines to enrol/twocheckout/enrol.php...

/**
 * Provides method to print the enrolment key form code. This method is called
 * from /enrol/manual/enrol.html if it's included
 * @param  object a valid course object
 */
function print_enrolmentkeyfrom($course) {
    $manual = enrolment_factory::factory('manual');
    $manual->print_enrolmentkeyfrom($course);
}

BEFORE THIS LINE...
} // end of class definition

This is a bug fix from the PayPal plugin which I did not know had been made, so I had not merged it into my plugin.
It loads the manual plugin before calling the print_enrolmentkeyfrom method.
I will do a check for other recent fixes and upgrade and test my plugin when I get a chance.

I have not yet had a chance to test above but hopefully it is straightforward.

I will hopefully get to look at the main problem later today.

    Alan.

In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

I have made the above fix (for option to support manual enrolment key in addition to 2Checkout) to the plugin database (http://moodle.org/mod/data/view.php?d=13&rid=1242).

    Alan.

In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by NN NN -
Hi,

first off, let me say thank you for creating this great module, setup was a breeze with no hickups at all.

I do however have a problem, when I try to enrol using the 2Checkout plugin, I get to the payment page, but it says that my cart is empty.

I've been poking around on the 2Checkout site and found this document, stating that 2Checkout requires these new parameters to be passed through, and I was wondering if this had anything to do with my problem?

here is a link to the page displaying the new parameter specs.

https://www.2checkout.com/documentation/newparameters.html

Is it at all pissible to update this module? aternatively, if you could point me in the right direction, i.e. which file to update with what code, I could attempt to do the changes myself.

Any assistance would be greatly appreciated.

Thanking you in advance

Julian
In reply to NN NN

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

I do not know why you are getting that error. But I do not think it is caused by the issue in the URL you reference.

The parameters I pass to 2Checkout are the following (look at enrol/twocheckout/enrol.html)...
sid ($CFG->enrol_twocheckoutbusiness)
quantity (1)
product_id ($course->idnumber)
fixed ("Y")
moodle_user_id ($USER->id, for my use only)
moodle_course_id ($course->id, for my use only)
lang ("en" or "sp")

So maybe you have omitted some step in configuring the plugin. Have you followed all the instructions in README.txt?

In particular step (6) which sets the Product ID for passing to 2Checkout...

6) Procedure for adding a new course to Moodle:
- Login to your moodle installation as an administrator (if not already logged in).
- Under Site Administration, click Courses.
- Click Add/edit courses.
- Click a Course category.
- Click Add a new course.
- Edit the course settings.
- In particular, under Course ID number enter the Product ID remembered from 2Checkout in step (4) above.
- Don't change the Enrolment Plugin (unless you want to for some reason).
- Note, you may not want to make the Course enrollable unless/until it is ready to go live.
- Set the Enrolment key to some secret key (must be set to something).
- Set the Cost to the cost you want (this is an indication only but should match the real 2Checkout cost in
step (4) to avoid confusing users). In any case, if it is zero people will probably not have to pay.
- Click Save changes .

If you still have problems after checking your configuration, if you give me access to your site I can probably sort out your problem. But as a first step you could do a "View Source" in your browser on the enrol page BEFORE clicking on "Send payment via 2Checkout" and send me the contents of that view source. That will contain the form data that is to be submitted to 2Checkout.

Alan.

In reply to Alan Barrett

Re: 2Checkout integration & "thank you page"

by NN NN -
Hi Alan,

Thanks for getting back to me, I still couldn't figure out what went wrong, but like I said, it used to work a few weeks ago, so I just did a rollback of my entire site, using a backup of a few weeks ago, and now all is fine. I must have done something funky to have messed it up in the first place, I just wish I knew what it was, so I don't do it again, lol
In reply to Richard dos Santos

Re: 2Checkout integration & "thank you page"

by Alan Barrett -

Richard, some queries/points to try to identify your first problem...

1) When you say the user clicks on "Take me to my good link", I think you have made a mistype here as I seem to remember that 2Checkout just returns to Moodle after the payment is complete and I can't remember that exact wording. Anyway that may just be my memory problem, but the wording sounds funny.

2) If you have access to your PHP error_log, could you look for a line with 'order_number.total'. This is printed when the error you have occurs.

3) Can you recheck the vendor Account number and Secret word in (a) and (b) match exactly:

a)
- Login to 2checkout.com
- Look at your Account number at the top of your Homepage
- Under Helpful Links click Look & Feel/Settings
- Look at the Secret word stored at the bottom of the page

b)
- Login to your Moodle installation as an administrator.
- Under Site Administration, click Courses.
- Click Enrolments.
- Beside 2Checkout click Edit.
- Look at enrol_twocheckoutbusiness (your 2Checkout vendor Account number)
- Look at enrol_twocheckoutsecret (your 2Checkout Secret word)

If the above does not indicate what the problem is, we can look at other things.

    Alan.