Jump to content

GatewayNaturePreserve

Member
  • Posts

    1
  • Joined

  • Last visited

GatewayNaturePreserve's Achievements

Level 1

Level 1 (1/20)

0

Reputation

  1. Site URL: https://gatewaynaturepreserve.org/spring-into-art-sale We are hosting a virtual art sale fundraiser for our organization. I used a code to add paypal pay buttons/credit card pay buttons to each item in the store. The payment goes through when someone makes an order but the item is not marked sold, in addition, it doesn't tell me which item was sold just the amount that was paid. Can you please help me solve this issue? Is there something I can add to the code to make it record the sold item as well as specify which item was paid for? This is the code I used, just changed the value to reflect the price of each of the items: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Ensures optimal rendering on mobile devices. --> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Optimal Internet Explorer compatibility --> </head> <body> <script src="https://www.paypal.com/sdk/js?client-id=ATxUbt3GpgXOZ362Wh5NhG-hA5DJrXMLwxwvJxuo0TThwiJTuyUUAkpfTb6YYLJ_oJexD_lWAHElcNNL"> // Replace YOUR_CLIENT_ID with your sandbox client ID </script> <div id="paypal-button-container"></div> <!-- Add the checkout buttons, set up the order and approve the order --> <script> paypal.Buttons({ 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) { alert('Transaction completed by ' + details.payer.name.given_name); }); } }).render('#paypal-button-container'); // Display payment options on your web page </script> </body> </html>
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.