Smart Payment Buttons JS SDK
benlau
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Feb-17-2020
02:07 AM
Hi there,
we are trying to use the Smart Payment Buttons to capture a payment for a non-physical good (callcenter hotline).
Both Sandbox and Live Environment are working fine, we only have two minor problems:
- We NEED to receive the phone number of the customer. We already changed the settings in our PayPal Account (required phone number field), but when a customer pays with PayPal, we do not receive his number.
- We want to display "billing address" on the PayPal page instead of "shipping address" / "ship to". Is that possible? We tried shipping_preference: "NO_SHIPPING" but this completely disables all address fields.
This is our JS snippet:
paypal.Buttons({
createOrder: function (data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: amount
}
}]
});
},
onApprove: function (data, actions) {
return actions.order.capture().then(function (details) {
console.log(data);
console.log(details);
// Call your server to save the transaction
// ...
},
style: {
layout: 'vertical',
color: 'silver',
shape: 'rect',
label: 'paypal'
}
}).render('#paypal-button-container');
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
- Add Others data in SDKs
- Need help to integrate Advanced Checkout (PPCP) With WHMCS in PayPal Upgrade Community
- Shipping options are not appearing in my cart through link or button. in PayPal Payments Standard
- Change the button from Sandbox to Production in REST APIs
- Issue with Rendering Trustly Payment Button via PayPal JavaScript SDK in SDKs