2
votes

I'm working on a shop app that I want to use Paypal with to checkout.

I have installed this very nifty React implementation of the Express Checkout Button - https://www.npmjs.com/package/react-paypal-express-checkout

After setting up my merchant account, developer app, and sandbox accounts it was working right away.

The only issue I'm running into is that my app has a built-in cart; Keeping track of what items the user intends to purchase and what options they have selected for each one ( Color, size, quantity, etc ), and the seller needs to know this information so they can ship the correct products.

I was wondering if there is a way I could send some additional information with the purchase to let the seller know what products the user has purchased and what options they have selected. If somehow I could just send one extra string to appear in the seller's account I could easily attach the user's cart info.

Sorry if this is a noob-ish question. I am still fairly new to web-dev.

1
why don't you just save all the cart information in the database when they attempt to pay and have a field paid:false and when paypal informs you that the payment has been made, change the field to true. Then in that you can have as many key values as you wantforJ
@serendipity I guess I'm not sure what you mean..paid is a boolean value.Gage Hendy Ya Boy
Yes. but in database you can save other values tooforJ
Then you can just filter by paidforJ
@serendipity I am trying to send the information to the sellers paypal to see when my client is reviewing orders, I am not displaying orders on the site. I could definitely do something like what you're saying, but I am 100% sure there is a way to send product information with a Paypal purchase (which is what I'm asking about.)Gage Hendy Ya Boy

1 Answers

0
votes

So I found in the documentation that you can send a table of items using item_list. With each item you can attach a name, as well as a list of options ( size, color, etc,. ) But I cannot find how to format this list in the documentation, and no one seems to know.

So as a workaround I am just attaching the options to the name so the buyer and seller can see a full list of every item and their options.

Here's what it looks like in your paypal transaction - enter image description here

If anyone needs to use this I forked the node package above and implemented this functionality. Hopefully this can help someone trying to implement paypal into their react shop.