In https://developer.paypal.com/docs/checkout/how-to/server-integration/#1-set-up-your-client-to-call-your-server, there is:
<script>
paypal.Button.render({
env: 'sandbox',
// Set up the payment:
// 1. Add a payment callback
payment: function(data, actions) {
// 2. Make a request to your server
return actions.request.post('/my-api/create-payment/')
.then(function(res) {
// 3. Return res.id from the response
return res.id;
});
}, ...
Is there a way to invoke the payment callback programmatically other than for a human to click the PayPal button?
... View more