PayPal checkout with subscribe, Things don’t appear to be working at the moment.
mbl-canary
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Dec-04-2018
12:32 AM
I`m using PayPal checkout button with rest api (java) for regular billing on sandbox.
However, when the PayPal popup pops up, it doesn't show details like amount.
payment token id is
EC-4UF94209S66565250
at developer site, I can see api call history, web hook history both. (create, update)
what's wrong with me?
<script src="https://www.paypalobjects.com/api/checkout.js" data-version-4 data-log-level="warn"></script>
paypal.Button.render({
client: {
sandbox: 'AbByNC6gfa_Ku1W_et46uL5oXX6QQEiOWhXYezMmY5Vms_rSLYV7T1dlUoSDOMKwzSgzI-TPTuwOjCT-',
production: 'AWn0CydcmQ6T5GSMiaG-SyA1VgWD9HCkn4VNnLfkzryrHcGoNzIT8N3XfYkS8V6mG7z1byJmjJBAP6rr'
},
env: 'sandbox', // Or 'sandbox'
commit: true, // This will add the transaction amount to the PayPal button
payment: function(data, actions) {
// 2. Make a request to your server
return actions.request.post('/paypal/create-payment/')
.then(function(res) {
return res.id;
}).catch(function(err) {
console.log("catch " + err);
});
},
// Execute the payment:
// 1. Add an onAuthorize callback
onAuthorize: function(data, actions) {
// 2. Make a request to your server
return actions.request.post('/paypal/execute-payment/', {
paymentID: data.paymentID,
payerID: data.payerID
})
.then(function(res) {
// not yet
// 3. Show the buyer a confirmation message.
}).catch(function(err) {
console.log("catch : " +err);
});
}
}, '#paypal-button');
and when onAuthorize, data.paymentId and data.payerId is undefined.
and... can't use PayPal checkout with subscribe?
there is no options for subscribe...
if so, I'm gonna make subscription by PayPal form button.
its work. but I have to change amount every month with rest api.
can I do that?
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- User is asked for shipping address when creating a credit card order in REST APIs
- Seller "Buy now" button - unable to edit a button in PayPal Payments Standard
- Adaptive Payments stopped working in early Feb 2024 in NVP/SOAP APIs
- Encrypted subscription button has stopped working in NVP/SOAP APIs
- payment issues in REST APIs