贝宝智能按钮(订阅)update_client_config_error
PayPal Smart-Buttons (Subscription) update_client_config_error
我正在尝试在我的网站上实施 PayPal-Smart-Buttons 以进行订阅。
我从 PayPal 文档 (https://developer.paypal.com/docs/subscriptions/integrate/#subscriptions-with-smart-payment-buttons) 复制了代码。所以我的代码看起来像这样:
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<script
src="https://www.paypal.com/sdk/js?client-id=AZz6Px2hMTBBNvg8GvMiT8FuTTvATwoAMCLVGLt-On-iewuacyQv-d6LSQunDqK1KES4KHTGDU3Sgpsb&vault=true">
</script>
<div id="paypal-button-container"></div>
<script>
paypal.Buttons({
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-64K047315T678654PL3W74YY'
});
},
onApprove: function(data, actions) {
alert('You have successfully created subscription ' + data.subscriptionID);
}
}).render('#paypal-button-container');
</script>
</body>
之前,我创建了两种产品,并为每种产品创建了一个计划。
以下是配置的计划:
{
"plans":[
{
"id":"P-64K047315T678654PL3W74YY",
"name":"AC-Bot Silver Subscription",
"status":"ACTIVE",
"usage_type":"LICENSED",
"quantity_supported":false,
"create_time":"2020-06-20T12:17:39Z",
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-64K047315T678654PL3W74YY",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
},
{
"id":"P-9LX00946YY976221PL3W74ZI",
"name":"AC-Bot Gold Subscription",
"status":"ACTIVE",
"usage_type":"LICENSED",
"quantity_supported":false,
"create_time":"2020-06-20T12:17:41Z",
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-9LX00946YY976221PL3W74ZI",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
}
],
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans?page_size=10&page=1",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
}
计划有效,但我收到错误:“未捕获错误:Api:/smart/api/billagmt/subscriptions/I-B9Y1J8J6HA9G/cartid 返回状态代码:500(Corr ID:4c5a81ed5a4db)”。
有人遇到过同样的问题吗?
我成功了,这就是它对我有用的方式,我希望它也对你有用。
以下是我为让它发挥作用所做的工作。
- 退出您的沙盒商店(如果您当前已登录)。
- 重新登录您的沙盒商店。
- 打开一个私人选项卡,并在那里测试您的按钮,或使用其他浏览器测试该按钮。确保您没有关闭商店所在的选项卡。
这对我有用。不知道为什么会这样
同时修复了PayPal的bug。一切正常。
我正在尝试在我的网站上实施 PayPal-Smart-Buttons 以进行订阅。 我从 PayPal 文档 (https://developer.paypal.com/docs/subscriptions/integrate/#subscriptions-with-smart-payment-buttons) 复制了代码。所以我的代码看起来像这样:
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<script
src="https://www.paypal.com/sdk/js?client-id=AZz6Px2hMTBBNvg8GvMiT8FuTTvATwoAMCLVGLt-On-iewuacyQv-d6LSQunDqK1KES4KHTGDU3Sgpsb&vault=true">
</script>
<div id="paypal-button-container"></div>
<script>
paypal.Buttons({
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-64K047315T678654PL3W74YY'
});
},
onApprove: function(data, actions) {
alert('You have successfully created subscription ' + data.subscriptionID);
}
}).render('#paypal-button-container');
</script>
</body>
之前,我创建了两种产品,并为每种产品创建了一个计划。 以下是配置的计划:
{
"plans":[
{
"id":"P-64K047315T678654PL3W74YY",
"name":"AC-Bot Silver Subscription",
"status":"ACTIVE",
"usage_type":"LICENSED",
"quantity_supported":false,
"create_time":"2020-06-20T12:17:39Z",
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-64K047315T678654PL3W74YY",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
},
{
"id":"P-9LX00946YY976221PL3W74ZI",
"name":"AC-Bot Gold Subscription",
"status":"ACTIVE",
"usage_type":"LICENSED",
"quantity_supported":false,
"create_time":"2020-06-20T12:17:41Z",
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans/P-9LX00946YY976221PL3W74ZI",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
}
],
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/billing/plans?page_size=10&page=1",
"rel":"self",
"method":"GET",
"encType":"application/json"
}
]
}
计划有效,但我收到错误:“未捕获错误:Api:/smart/api/billagmt/subscriptions/I-B9Y1J8J6HA9G/cartid 返回状态代码:500(Corr ID:4c5a81ed5a4db)”。
有人遇到过同样的问题吗?
我成功了,这就是它对我有用的方式,我希望它也对你有用。
以下是我为让它发挥作用所做的工作。
- 退出您的沙盒商店(如果您当前已登录)。
- 重新登录您的沙盒商店。
- 打开一个私人选项卡,并在那里测试您的按钮,或使用其他浏览器测试该按钮。确保您没有关闭商店所在的选项卡。
这对我有用。不知道为什么会这样
同时修复了PayPal的bug。一切正常。