• Resolved platoche56

    (@platoche56)


    Hi,

    I have an issue with the optin on the checkout page for Paypal only (Stripe works) where the hidden input field with a nonce added by Sendinblue causes the following error with Paypal checkout due to malformed Json. The response of the xhr call via Paypal indeed returns the following raw response:

    <input type="hidden" class="ws_opt_in_nonce" name="ws_opt_in_nonce" value= "91eed72c0a">
    				{"success":true,"data":{"token":"EC-95612932HX675794C"}}

    As you can see the input is returned by Paypal causing a malformed json error resulting the following error:
    create_order_error {err: "SyntaxError: Unexpected token < in JSON at positio…bility,messages&commit=true&currency=EUR:2:128921", timestamp: "1625481094169", referer: "www.paypal.com", sdkCorrelationID: "a082f9f50c502", sessionID: "uid_1dd075158a_mta6mze6mdq",?…}

    This occurs despite the response returning “success”.

    It has to do with the way form inputs are serialized by PayPal. Could you investigate and make it work with this popular plugin without breaking functionality?

    Many thanks,

    A

    • This topic was modified 3 years, 4 months ago by platoche56.
Viewing 5 replies - 16 through 20 (of 20 total)
  • Hi @alice888

    Yes Version 2.0.27

    Thanks!

    Plugin Support alice888

    (@alice888)

    Hello @tanmay-kumar-das,

    Thanks for your response.

    I am going to check your case with the investigating developer. In the meantime, a temporary fix is to disable the opt-in checkbox at checkout page.

    I will be back in touch shortly.

    Kindly,

    Hi

    Thank you!

    Our Client is keen to pass user to Sendinblue

    Best

    Tanmay

    When I make a call to the wordpress API in the answer I get the following html line:

    <input type="hidden" class="ws_opt_in_nonce" name="ws_opt_in_nonce" value="e03c931dae">

    which makes the response unusable

    Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 3

    could you fix this bug

    ps: i don’t use paypal

    Sendinblue – WooCommerce Email Marketing Version 2.0.28

    thank you

    • This reply was modified 3 years, 3 months ago by Yui.
    • This reply was modified 3 years, 3 months ago by vince93290.

    Hi there

    I am using Version 2.0.28

    Just tried again but user isn’t going to Sendin blue account when we are using paypal. It works when we use cash on delivery

    Could you take a look please?

    Many thanks

    Tanmay

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Optin checkout nonce causes PayPal Checkout to fail’ is closed to new replies.