Jump to content

Error: "PayPal payment options are invalid [...]"


totomato

Recommended Posts

Hi,

I use the native PayPal module version 4.3.3 with Prestashop 1.7.2.4.
I have activated Braintree, with only 1 enabled option :"Accept Paypal payments".
Credit Cards processing are OK, but PayPal doesn't work.

1/ If I select PayPal and click the yellow PayPal button that appears, i have this error in red appear just below :
"Error: PayPal payment options are invalid. ./node_modules/post-robot/src/index.js/_RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.RESPONSE]@https://www.paypalobjects.com/api/checkout.js:3298:31 receiveMessage@https://www.paypalobjects.com/api/checkout.js:2858:25 messageListener@https://www.paypalobjects.com/api/checkout.js:2879:13"

2/ If I select PayPal, but don't use the PayPal button and go down to the "Order" button, the next page displays "unknown error".

I tried different cache configurations, php versions (7.0 and 7.1), and thinks it is a new error, that wasn't there a week ago.

I would add that all core files are "as is" and I don't use overrides.

Am I the only one with this problem ? I only saw the same exact error appear in the spanish forum 5 days ago, here :https://www.prestashop.com/forums/topic/736321-problemas-al-configurar-paypal/.

Does anyone know more about this ?

Regards,
-Mathieu

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I am setting up a new store and am receiving the same error.  Is this module simply broken?

 

Edit: ah - looks like you need to go through an approval process by braintree first ... I assumed that since I had a long-standing paypal business account, and logged in using that, it would "just work". Apparently not.

Edited by irrelevant
more info (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

I found a solution to make Paypal work with Braintree.
I think it works without removing any functionality.
(Afaik, part of the bug has obviously been removed by Braintree on the server side.)

On IE, the module now works OK, and makes a sentence appear below the Paypal button: " Click paypal button first".
A click on the Paypal button forces the payment process to continue in a pop-up window, and succeeds.

What follows is a fix to make this also work on Chrome and Firefox:
Without the fix, a new page with an error appears and payment process fails on these 2 browsers.

1/ Upgrade Paypal module to version 4.4.1

2/ Activate Braintree and go through the activation process with your Paypal account.
@ireelevant : I didn't see any need for an "approval process" by Braintree first.

3/ Activate "Accept payment with Paypal" in the module options.

4/ Edit the file /modules/paypal/views/js/payment_pbt.js and correct these lines:
Line 94:

            $('#payment-confirmation button').click(function(){

becomes

           $('#payment-confirmation button').click(function(e){

 

and lines 100 and 101:

                    event.preventDefault();
                    event.stopPropagation();

become
 

                    e.preventDefault();
                    e.stopPropagation();

As I am no javascript expert, so please test first.
 

=> It's great to see this module now offers both credit card processing AND Paypal processing for free !

-M-

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...