createOrder

rhubarbexpert
Contributor
Contributor

I haven't created a new PP script for several years and a lot of things have changed.  So I logged in and > Quick Links > Pay Pal Checkout > Quick setup for individual items.  I copied the code and installed it and "Hey, it worked".  Great.  Now I need to modify it to accept a "item_number" (or item_name) so that when "auto-return" comes back with the transaction I can pull the right data/customer and update my order database.

[code] return actions.order.create({
purchase_units: [{
amount: {
value: '1.01',
},
item_name: {
value: '54,250',
}
}]
});

[/code]

the above runs but what gets returned is: ["item_name"}=> string(0) ""

Help please

Thanks

 

Login to Me Too
2 REPLIES 2

MTS_Chiranjeevi
Moderator
Moderator

Hi @rhubarbexpert,

 

Thank you for contacting PayPal community.

 

We apologize for any inconvenience.

 

I request to please use the "items" array  under "purchase_unit_request ".

 

Thank you for understanding and patience.

 

Sincerely,

Chiranjeevi

PayPal, Inc. 

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

 

Login to Me Too

JackieDaytona
Contributor
Contributor

For some unknown REASON PayPal ANSWERS FAIL to give the user what he asking.  He did not want a REFERENCE to the API STRINGS, I believe he Wanted AN EXAMPLE OF HOW TO USE IT IN HIS CODE.  ARE YOU PEOPLE ON DRUGS???

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.