I'm using the latest version of PayPal JavaScript SDK (instead of the deprecated checkout.js) together with the Smart Button for my payment page. When PayPal shows the credit/debit card data entry form, at the bottom, I want it to display 'Pay Now' instead of 'Buy Now' because I'm not selling merchandise items but services, how can I do that? I followed this example, but it only changes the main button with 'Pay with PayPal' together with the 'Credit/Debit Card' button, but the blue color 'Buy Now' still showing below the form: paypal.Buttons({
style: {
layout: 'vertical',
color: 'gold',
shape: 'rect',
label: 'pay' // I changed to 'pay' instead
}
}).render('#paypal-button-container'); I even follow this guide to add the commit=true parameter to the SDK but no luck: <script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&commit=true"></script> Below is my full code just in case you need it: paypal.Buttons({
style: {
layout: 'vertical',
color: 'gold',
shape: 'rect',
label: "pay"
},
createOrder: function (data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
currency_code: "MYR",
value: "1.00"
}
}],
application_context: {
shipping_preference: "NO_SHIPPING"
}
});
},
onApprove: function (data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture()
.then(function (details) {
// This function shows a transaction success message to your buyer.
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
}).render('#gPayContainer');
//This function displays Smart Payment Buttons on your web page. Any advice would be appreciated, thank you!
... View more