Paypal Payment Gateway transaction hangs

Paypal Payment Gateway transaction hangs

by Colin G -
Number of replies: 2
Hi. I am trying to setup Paypal Payment gateway to replace the old paypal enrol method (which is working with my paypal account)

Using the paypal payment gateway method to enrol to a course I type in credit card details and then submit - the screen then hangs on the "Authorising the payment" screen but never gets past it and no errors are displayed even with developer debugging turned on. Does anyone have any idea why it is getting stuck here???

Thanks


Average of ratings: -
In reply to Colin G

Re: Paypal Payment Gateway transaction hangs

by Renaat Debleu -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
This is typical behavior if PayPal cannot talk to your instance, or your instance cannot talk to PayPal.

Have you
  • checked if your Moodle instance is publicly accessible?
  • reviewed your firewall?
  • read the docs on https://docs.moodle.org/dev/Setting_up_PayPal_development ?
  • setup a sandbox environment?
  • setup a merchant account and double checked all keys and passwords?
  • tried to change the amount from 1 to 10?
  • tried to change the currency?
  • checked if you are not blocked by PayPal, if you test the production environment of PayPal, they can see your actions as a brute force attack.
Average of ratings: Useful (1)
In reply to Renaat Debleu

Re: Paypal Payment Gateway transaction hangs

by Colin G -
ok I think I have finally found the problem. The server has curl version 7.29 but min requirement for this to work is curl version 7.34. Moodle 4.2 does not check that curl version is at least 7.34

There is a tracker issue about this.

 error “Exception - Undefined constant "paygw_paypal\CURL_SSLVERSION_TLSv1_2" option was added in curl 7.34.0 so no older version can ask specifically for 1.2, you could only ask for “TLS” back then.

The fix is to upgrade curl and php curl support to newer release.
Average of ratings: Useful (2)