How to change the Subject in the PayPal button API, when I make a payment?

mmartinez887
New Community Member

I have a paypal button to make payments from my website to paypal, everything is done successfully, but the payment issue that comes to my account is:

Receipt for Your Payment to test facilitator's Test Store

and need change it, my code follows:

 

<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>

<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb&currency=USD"></script>

<script>
    // Render the PayPal button into #paypal-button-container    paypal.Buttons({

        // Set up the transaction        createOrder: function(data, actions) {
            return actions.order.create({               
purchase_units
: [{
amount
: {
value
: '0.01' } }] }); }, 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'); </script>

 

Login to Me Too
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.