Thanks for that🙏 , it really helped clarify my doubts😊... I feel like their documentation isn't adequately explanatory enough ... My server integration isn't working for some reason😢.... Could you help identify what i'm doing wrong? Client side onApprove: function(data) {
return fetch('/server-side-file-name', {
headers: {
'content-type': 'application/json'
},
body: JSON.stringify({
orderID: data.orderID
})
}).then(function(res) {
return res.json();
}).then(function(details) {
alert('Transaction funds captured from ' + details.payer_given_name);
})
} ON the SERVER SIDE if (!count(debug_backtrace()))
{
$json = file_get_contents('php://input');
$data = json_decode($json);
$orderid = $data->orderID;
CaptureOrder::captureOrder($orderid, true);
}
... View more