问题标签 [paypal-rest-sdk]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
paypal - Paypal 的交易对象,交易失败
我们正在使用 Paypal Pro 进行直接信用卡处理。当我在请求中放入 2 笔交易时会发生什么,信用卡批准了一个交易对象,但由于资金不足而拒绝了另一个交易对象。PayPal 是否会丢弃整个交易并返回错误?
直接从 node.js 的 paypals rest api 获取以下代码
当我们将 2 个交易对象放入其中时会发生什么情况,我们是否必须处理信用卡在第二次交易中被拒绝的情况?
paypal - Paypal REST API 存储的信用卡,它去哪儿了?
所以我在玩 API,我已经成功创建了一个信用卡令牌。
我知道如果我记得 ID,我可以更新和删除它,但是如果我不记得 ID 来引用卡片怎么办。如何查看我创建的所有信用卡。如果我忘记了身份证?让我感到困扰的是,我可以创建它们并让它们理论上永远卡在 Paypal 的服务器上,而无法通过控制台或任何命令将其删除以给我带来它们的列表?卡具体去哪了?他们会消失在以太中吗?
是否可以获得我存储的信用卡列表?
php - PayPal REST API 为信用卡令牌返回 500 服务器错误
我正在尝试让 PayPal REST api 使用存储在保险库中的信用卡创建付款。但是,每当我尝试使用保险库中的卡付款时,PayPal 的 API 都会挂起大约半分钟,然后给我以下 500 错误:
这是我正在使用的代码(如果这里有太多信息,我很抱歉,我不知道哪些信息与我的问题有关)
如果我更改$useVault
为,false
则将进行付款,并且交易将显示在开发人员沙箱中。我在 dev-tools.paypal.com 上使用了本指南,它似乎和我遇到了同样的问题(我进入第 3 步,共 4 步,它显示发生了内部服务错误
node.js - Paypal REST API 调用不使用 nodeJS 和 paypal-rest-sdk npm 模块保存 trasactionID
我在 nodeJS 和 paypal-rest-sdk npm 模块中使用 paypal rest api。
我正在使用 REST API 通过使用快速结帐的贝宝创建付款。我可以成功获得一个重定向网址,用户被重定向到贝宝以授权交易。
但是,当用户完成交易时,我可以在 paypal 开发者网站的仪表板中看到交易显示:developer.paypal.com
没有 transactionID 让我相信有些事情是不对的。我们在我们的贝宝个人资料中看不到任何钱。
请参考 2 个屏幕截图,注意 Transaction ID 为 N/A:
我们知道这不是凭证问题。我们可以从 Paypal 获得成功的响应。此示例是第一步,获取重定向 url 以将用户发送到 paypal 的站点以进行授权:
提前感谢您的帮助,如果您以前遇到过此问题,请发表评论。
paypal - paypal REST API transaction approved
I making an integration with paypal. I'm using REST API for java. Currently, I have a problem with pending payments. When I look up a payment (https://api.paypal.com/v1/payments/payment/{paymentId}) to sandbox environment to check the payment status the responses are different. When I approved payment as a seller the payment is in status
approved
and sale is in status
completed
example response:
{
"id": "PAY-5YK922393D847794YKER7MUI",
"create_time": "2013-02-19T22:01:53Z",
"update_time": "2013-02-19T22:01:55Z",
"state": "approved",
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"type": "mastercard",
"number": "xxxxxxxxxxxx5559",
"expire_month": "2",
"expire_year": "2018",
"first_name": "Betsy",
"last_name": "Buyer"
}
}
]
},
"transactions": [
{
"amount": {
"total": "7.47",
"currency": "USD",
"details": {
"subtotal": "7.47"
}
},
"description": "This is the payment transaction description.",
"related_resources": [
{
"sale": {
"id": "36C38912MN9658832",
"create_time": "2013-02-19T22:01:53Z",
"update_time": "2013-02-19T22:01:55Z",
"state": "completed",
"amount": {
"total": "7.47",
"currency": "USD"
},
"parent_payment": "PAY-5YK922393D847794YKER7MUI",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/36C38912MN9658832",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/36C38912MN9658832/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI",
"rel": "parent_payment",
"method": "GET"
}
]
}
}
]
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI",
"rel": "self",
"method": "GET"
}
]
}
and sometimes payment is
pending
and the sale status in
completed example respose:
{ "id": "PAY-5YK922393D847794YKER7MUI", "create_time": "2013-02-19T22:01:53Z", "update_time": "2013-02-19T22:01:55Z", "state": "pending", "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "type": "mastercard", "number": "xxxxxxxxxxxx5559", "expire_month": "2", "expire_year": "2018", "first_name": "Betsy", "last_name": "Buyer" } } ] }, "transactions": [ { "amount": { "total": "7.47", "currency": "USD", "details": { "subtotal": "7.47" } }, "description": "This is the payment transaction description.", "related_resources": [ { "sale": { "id": "36C38912MN9658832", "create_time": "2013-02-19T22:01:53Z", "update_time": "2013-02-19T22:01:55Z", "state": "completed", "amount": { "total": "7.47", "currency": "USD" }, "parent_payment": "PAY-5YK922393D847794YKER7MUI", "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/sale/36C38912MN9658832", "rel": "self", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/sale/36C38912MN9658832/refund", "rel": "refund", "method": "POST" }, { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", "rel": "parent_payment", "method": "GET" } ] } } ] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", "rel": "self", "method": "GET" } ] }
Similarly, Sanbox works when I reject the transaction. Once the payment status is failed and sale status is reversed and another time is pending and reserved.
My question is when can be 100% sure about the transaction is completed or failed? Should I check the payment status or the sale status? Maybe this this problem is related only with sandbox not with production.
PS. This code is only the sample, do NOT analyze it.
php - Paypal Rest API 多个收款人
我可以在 Paypal 中有多个使用 REST API 的收款人吗?
https://devtools-paypal.com/guide/pay_paypal/php?interactive=ON&env=sandbox
上面的链接没有说清楚,是最有用的。
php - Paypal REST API 不会在 Paypal Sandbox 或实时网站上显示付款金额
休息 api 工作正常,但未按顺序显示金额“按顺序显示金额未显示但描述显示?” “我正在使用下面的代码来传递金额和描述”
rest - REST API 返回 AUTHORIZATION_ERROR
按照发票 REST API https://developer.paypal.com/docs/api/#invoicing中提供的一些示例,我总是收到 AUTHORIZATION_ERROR。
这是一个例子:
首先检索我的令牌:
然后使用该令牌创建发票:
我可以在这里成功发送付款请求:https ://developer.paypal.com/docs/integration/direct/make-your-first-call/
但由于某种原因,发票不起作用。
我已验证在我的沙盒应用程序中我已启用发票
任何帮助表示赞赏,在此先感谢。