Replies: 0
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¤cy=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. Any ideas on how to fix? The plugin I am using is Sendinblue Marketing. It may be because the hidden field nonce is appended to the the top of the form.
Many thanks,
A