Coder Social home page Coder Social logo

Multiple Transactions about paypal-node-sdk HOT 6 CLOSED

paypal avatar paypal commented on September 6, 2024
Multiple Transactions

from paypal-node-sdk.

Comments (6)

 avatar commented on September 6, 2024

Update: Just got a new error saying that multiple transactions aren't possible with paypal. What if I have a shopping cart and need to charge for multiple items?

{"name":"VALIDATION_ERROR","details":[{"field":"transactions","issue":"Only single payment transaction currently supported"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"ff4164ef25bb3"}

from paypal-node-sdk.

ppmtscory avatar ppmtscory commented on September 6, 2024

If you are just looking for line item support, you could utilize the Item List object - https://developer.paypal.com/webapps/developer/docs/api/#itemlist-object.

from paypal-node-sdk.

 avatar commented on September 6, 2024

You cannot do multiple transactions in paypal. Worked with this curl though:

curl -v https://api.sandbox.paypal.com/v1/payments/payment -H 'Content-Type:application/json' -H 'Authorization: Bearer 3SJJq3HHLlt-.6T16Z4hkGYPUe7WMDnaOJNw1d7J6V8' -d '{
"intent":"sale",
"payer":{
"payment_method":"credit_card",
"funding_instruments":[
{
"credit_card":{
"type":"visa",
"number":"4446283280247004",
"expire_month":"11",
"expire_year":"2018",
"first_name":"Joe",
"last_name":"Shopper"
}
}
]
},
"transactions": [
{
"item_list": {
"items": [
{
"quantity": "1",
"name": "foo",
"price": "7",
"currency": "USD"
},
{
"quantity": "1",
"name": "bar",
"price": "7",
"currency": "USD"
}
]
},
"amount": {
"total": "14",
"currency": "USD",
"details": {
"subtotal": "14",
"tax": "0",
"shipping": "0"
}
},
"description": "This is the payment transaction 1 description."
}
]
}'

from paypal-node-sdk.

 avatar commented on September 6, 2024

Great, that worked @ppmtscory

from paypal-node-sdk.

 avatar commented on September 6, 2024

Thanks a bunch!

from paypal-node-sdk.

ppmtscory avatar ppmtscory commented on September 6, 2024

Anytime!

from paypal-node-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.