Sending Product Name instead of ID to Paypal for reference #284
Replies: 1 comment 1 reply
-
You are correct. The order number is being passed to the item_name property used in the remote post to PP. If you have a cart with multiple items it makes sense for most scenarios. If you have a specific use case where a single product is being used then perhaps the item_name being used for the product name would be a bit better. If you have a cart with a few items and you wish to combine them into the item_name property then you would need to loop through the product data within PurchaseInfo and build your custom data. Dave has plenty examples in the code for how to work with xml related to product data. It would be a relatively straight forward change to put a product name in there https://github.com/openstore-ecommerce/OS_PayPal/blob/8a08ee8515ee198d2f7fec1b8ade1ae7086d8634/Components/ProviderUtils.cs#L50 To enable a custom data point it may involve adding an additional setting in the settingsfields.cshtml and some minor mods to the same item_name property above. I am not sure if you're coding, or that it would get approved, but creating a feature branch would let others take a peek and/or merge it in if possible. Even if it doesn't get merged others can see what you are striving for and will be better able to help. Not too much work if you're already set up in you're dev environment. |
Beta Was this translation helpful? Give feedback.
-
Currently it seems like OpenStore is sending the order# to paypal as the name of the order. Instead I'd like it to send the name of the product(s) + a custom data point defined in the OpenStore backend. How can I make this change?
Beta Was this translation helpful? Give feedback.
All reactions