I'm integrating the new Paypal smart payment button
<script src="https://www.paypal.com/sdk/js?...>
paypal.Buttons({
createOrder(data, actions) {
// ...
onApprove: function(data, actions) {
// Capture the funds from the transaction
return actions.order.capture().then(function(details) {
// Show a success message to your buyer
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
).render('#paypal-button');
I created an app in Sandbox and registered Webhooks to all events. When a payment is triggered I get everything working and a webhook event of type PAYMENT.CAPTURE.COMPLETED is fired.
I'm sure I'm missing something in the process but I can't link this payment to the payer details. I don't know where the payer details are so I can't process the order on my side.
I searched the whole Google and PP documentation without success, anyone can help me? Thanks!!