I've implemented the following code to accept subscriptions with PayPal's smart buttons. It was working correctly, but it has been showing an error message for the last couple of hours. No changes have been made to the code.
paypal.Buttons({
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': plan_id
});
},
onApprove: function(data, actions) {
//alert('You have successfully created subscription ' + data.subscriptionID);
}
}).render('#paypal-button-container');
The error message in the browser console is:
A boolean is being passed as a fourth parameter to window.open. This is not used and may cause an exception in a future release.
POST https://www.paypal.com/smart/api/billagmt/subscriptions/I-XXXXXXXXXXXX/cartid 400
create_order_error
Is anyone having the same issue?
400 validation error that looks like a PayPal issue, I think it will be rolled back. Try again in something like 4 hours or so and see if it's resolved.