Trying to integrate PayPal Checkout using the following configuration and code... <script src="https://www.paypal.com/sdk/js?client-id=<clientId>&enable-funding=venmo&disable-funding=card"></script> <script>
paypal.Buttons({
style: {},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '<totalPrice>'
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
console.log(details);
});
}
}).render('#paypal-button-container');
</script> Everything works except for the Pay Later option. I get the following error after completing the form... Can not pay order for unauthorized order It works if I use intent=authorize, but I need to capture the funds immediately. Any help would be appreciated!
... View more