Community Forums

ATutor Modules

Payment Module v1.4


You must be signed-in to post.

AuthorSubject
 
Page: 1
starlingweb
Subject: Payment Module v1.4Quote this post in your reply
ATutor Version: 2.0.2(r10589 - 2010-12-21 16:47:09)
Payment Module Version 1.4
PHP Version: 5.3.27-pl0-gentoo
MySQL Version: 5.0.91
OS: Linux 3.2.51-hardened-r2

Admittedly an old setup, but it is working well enough for our needs.

With Greg's help I have, with one exeception, got the payment module working.

- I have set up a PayPal Sandbox merchant account and a sandbox personal account.
- I have linked the Payment Module to the sandbox merchant account.
- I register for the course in question, am directed to the Payment Module, am forwarded to PayPal where it accepts my fake payment and eventually redirects me back to ATutor, where I get the error message:
"The following errors occurred:
The payment was cancelled or failed."
-- BUT, the table on the return page in ATutor shows the payment was actually accepted, and it sends messages to both the instuctor saying the enrolement is pending and to the student as it is supposed to.

So, my question is, will the error message disappear when I am using our real PayPal Merchant account and real students try to pay? Or have I missed some critical configuration step?

Thanks in advance for any help with this.
Posted: 2014-12-09 17:18:00
greg

Avatar for greg
Subject: Re: Payment Module v1.4Quote this post in your reply
The transaction should work with the sandbox setup.

It's difficult to say what's wrong. You can do some debugging, by uncommenting the print_r() lines below the line that generates the error message, to see what gets returned from Paypal. Make sure there's a value for the "st" variable listed in the output from print_r();

https://github.com/atutor/payments/blob/master/response_paypal_user.php#L30

Also be sure that IPN is enabled and working. Setup is described in the module's readme.
Posted: 2014-12-10 09:23:25
starlingweb
Subject: Re: Payment Module v1.4Quote this post in your reply
Thanks for the tips, Greg... I'll report back on my results.
Posted: 2014-12-10 12:18:04
starlingweb
Subject: Re: Payment Module v1.4Quote this post in your reply
I am confused by some apparently conflicting instructions for PayPal setup in the readme file. In the second paragraph it states:

"Once you have your paypal account setup, enter the URL to the PayPal Credit Card processing in the Payments>Settings screen, followed by the Vendor ID, which is the email address associated with the vendor account (leave the password field empty)"

[NOTE it says: leave the password field empty]

Later, under PayPal IPN setup, it says:

"... The [IPN] URL should also include the password you entered when setting up the module Settings in ATutor.

and gives the example: www.mysite.com/ATutor/mods/payments/response_ipn.php?secret=payment01 where I assume "payment01" is the password referred to.

Can you clear up this confusion?
Thanks!
Posted: 2014-12-12 11:56:23
greg

Avatar for greg
Subject: Re: Payment Module v1.4Quote this post in your reply
I'm not exactly sure of the answer. I'd suggest experimenting.
Posted: 2014-12-12 12:11:15
starlingweb
Subject: Re: Payment Module v1.4Quote this post in your reply
Problem fixed - (but issue outstanding)

After a frustrating series of attempts - changing parameters, using different possible passwords and account ids, etc. and still getting the error message in ATutor after successfully "paying" in PayPal's Sandbox - I decided to try it with our actual business account and my own paypal account. And guess what?

Regisration and payment occurs with no error messages, using essentially the same Payment Module settings, PayPal Pay Now button, and IPN settings as I was trying in the Sandbox.

I was unable to see anything (anything I could understand, at least) in the Paymemt modules various php files that was causing the problem. I was also unsuccessful at trapping any error codes coming from PayPal or generated by the Payment module. PayPal was clearly saying "purchase ok" but when connected to the Sandbox, the Payment Module wasn't seeing it.

Anyway... thank for the help.
Posted: 2014-12-15 14:38:46
greg

Avatar for greg
Subject: Re: Payment Module v1.4Quote this post in your reply
Are you say the Sandbox did not work but the Production version did?

If there's an issue with the Sandbox, I might post a bug report so there's a record. At some point we can do more investigating to try to track down the problem so others don't end up with the same experience.

I do admit the Paypal setup is more complex than the typical credit card services. If there's any additional details you can add that might help the next person, I'm sure they'll be appreciated.
Posted: 2014-12-15 14:49:15
 
Page: 1

You must be signed-in to post.

Related Articles