Answer the question
In order to leave comments, you need to log in
How to correctly send a custom field via smart button to get it in IPN?
I'm trying the option that Google gave me, namely, I add after AMOUNT - custom, but the IPN comes with an empty custom field (the transaction_subject field is also empty)
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: dataResponse.value
},
custom: dataResponse.uuid
}]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
Answer the question
In order to leave comments, you need to log in
I found an error (but honestly I didn’t understand why it was necessary):
You need to write custom_id in the props of purchase_units instead of just custom .
The IPN will be recorded in the CUSTOM field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question