我正在使用这些设置将 PayPal 集成到我的网站中。
paypal.Buttons({
locale: "en_GB",
style: {
color: 'blue',
shape: 'pill',
label: 'pay',
height: 40
},
Run Code Online (Sandbox Code Playgroud)
如果您使用 PayPal,一切都很好,并且会以英镑显示,但如果您决定使用信用卡付款,它似乎总是默认为美国。我在 PayPal 开发者网站上找不到任何内容,这里也找不到。有什么办法可以改变这个吗?
我想从删除产品catalogs,但我找不到任何API执行此操作的方法,这里是文档。
我知道如何获得所有产品:
https://api.sandbox.paypal.com/v1/catalogs/products?page_size=10&page=1&total_required=true
Run Code Online (Sandbox Code Playgroud)
这将返回如下内容:
{
"products": [
{
"id": "PROD-8DN39312TB525331M",
"name": "Video Streaming Service",
"description": "Video streaming service",
"create_time": "2020-01-07T18:50:01Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/catalogs/products/PROD-8DN39312TB525331M",
"rel": "self",
"method": "GET"
}
]
},
...
Run Code Online (Sandbox Code Playgroud)
有没有实际的方法来删除产品?
我正在编写一个服务(在 .NET Core 3.1 和 Refit 中,如果重要的话),它从我的 PayPal 业务帐户中提取给定日期范围内的交易活动,以在管理仪表板上使用。目前我正在关注这里的教程:
https://developer.paypal.com/docs/api/get-an-access-token-postman/
和这里:
https://developer.paypal.com/docs/api/transaction-search/v1/
第一部分,我可以得到一个授权密钥就好了(使用 curl 或 postman,curl 下面
curl --location --request POST 'https://api.paypal.com/v1/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <my client id>:<my secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
// not sure what this is, postman specific maybe?
--header 'Cookie: tsrce=devdiscoverynodeweb; ts=vr%3D0cee9361171ac120001362adffec14c3%26vreXpYrS%3D1679730671%26vteXpYrS%3D1585061694%26vt%3D0cee9390171ac120001362adffec14c2' \
--data-urlencode 'grant_type=client_credentials'
Run Code Online (Sandbox Code Playgroud)
这在邮递员和我的自定义服务中都给了我一个身份验证令牌。接下来,当我尝试提取交易(在 Postman 和代码中)时,出现错误
卷曲:
curl --location --request GET 'https://api.paypal.com/v1/reporting/transactions?start_date=2020-03-01T00:00:00Z&end_date=2020-03-31T23:59:59Z' \
--header 'Authorization: Bearer <my token>' \
// Postman???
--header 'Cookie: tsrce=devdiscoverynodeweb; ts=vr%3D0cee9361171ac120001362adffec14c3%26vreXpYrS%3D1679730671%26vteXpYrS%3D1585061694%26vt%3D0cee9390171ac120001362adffec14c2'
Run Code Online (Sandbox Code Playgroud)
错误:
{
"localizedMessage": …Run Code Online (Sandbox Code Playgroud) 我正在使用 PayPal Checkout 在客户端进行基本付款,我询问这是否安全,因为我不希望用户更改金额。
此代码与文档中给出的代码相同。
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '100'
}
}]
});
}
}).render('#paypal-button-container');
</script>
Run Code Online (Sandbox Code Playgroud) 我正在使用 PayPal API 将付款选项添加到我的网站。在他们的教程中,他们使用 JavaScript 在客户端完全渲染按钮并设置交易。这是示例代码:
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
},
onApprove: function(data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture().then(function(details) {
// This function shows a transaction success message to your buyer.
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
}).render('#paypal-button-container');
//This …Run Code Online (Sandbox Code Playgroud) 我正在创建 PayPal 结帐按钮,有什么方法可以自动填写借记卡或信用卡表单中的帐单地址吗?
我当前的代码:
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '1'
}
}],
});
}
}).render('#paypal-button-container');
Run Code Online (Sandbox Code Playgroud) 我通过以下链接关注了 PayPal Android SDK 集成:https://developer.paypal.com/docs/limited-release/native-checkout/android/invoking-sdk。
我正在使用 PayPal 智能付款按钮在我的网站上启用付款。我设法禁用了送货地址字段,但我无法禁用帐单地址。
据我所知,大多数接受在线支付的网站不需要账单地址或任何信息,除了信用卡详细信息和持卡人姓名。
为什么 PayPal 需要输入账单地址,有没有办法禁用它?
谢谢!
我正在沙盒模式下将 PayPal 与我的平台集成。
我想用我的平台名称重命名“John Doe's Test Store”(如下图所示)。
我还想用我的平台名称重命名下面第二张图中的“John Doe's Test Store”。
如何才能做到这一点?
我正在使用 PayPal webhooks 自动获取订阅信息。
不过,从付款到订阅激活之间我们需要等待大约 20 秒。
是因为沙盒环境的原因吗?生产环境速度更快吗?
这一点很重要,因为顾客必须等待,如果可以避免等待时间那就更好了。