Hey there,
I’m trying to integrate PayPal in my Kirby project.
Simply I want a customer to pay a predefined amount via PayPal and store the information about the purchase in an kirby user’s field.
The payment process works quite fine.
When the payment process is done and approved by PayPal, following js script runs:
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// action belongs here
});
},
Now I struggle with running a php function from here on. I want to store an information about the payment in kirby.
$kirby->user()->update([
'balance' => /* former balance + update amount */
]);
Do you have some ideas or snippets for me?
Thank you so much!