I am using the paypal-rest-sdk package in Node.js. I want to change the payment button name, but I haven't found any solution. If there is any solution, please let me know.Thank in advance.
import paypal from "paypal-rest-sdk";paypal.configure({ mode: process.env.PAYPAL_PROCESS, //sandbox or live client_id: process.env.PAYPAL_CLIENT_ID, client_secret: process.env.PAYPAL_SECRET_KEY,});const totalPay = findBookingId.totalPrice;const create_payment_json = { intent: "sale", payer: { payment_method: "paypal", }, redirect_urls: { return_url: apiBaseUrl(`paypal/success`) + `?booking_id=${findBookingId._id}&auth=${auth}`, cancel_url: apiBaseUrl(`paypal/cancel`) + `?booking_id=${findBookingId._id}`, }, transactions: [ { item_list: { items: [ { name: "Ride", price: totalPay.toString(), currency: "USD", quantity: 1, }, ], }, amount: { currency: "USD", total: totalPay.toString(), }, description: "Stork ride payment", }, ],};paypal.payment.create(create_payment_json, function (error, payment) { if (error) { return res.status(400).send({ message: error }) } else { for (let i = 0; i < payment.links.length; i++) { if (payment.links[i].rel === "approval_url") { // console.log("Link :- ", payment.links[i].href); return res.send({ data: payment.links[i].href }); } } }});
I have share the image so look into this.Paypal payment link