Paypal沙盒订阅按钮400错误

huangapple go评论105阅读模式
英文:

Paypal Sandbox Subscription Button 400 Error

问题

我在PayPal沙箱中遇到了一个奇怪的问题。
我试图从https://sandbox.paypal.com/buttons创建一个订阅按钮,但它不起作用!

这是该页面生成的代码。

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick" />
    <input type="hidden" name="hosted_button_id" value="F7H82MZZ8PFKL" />
    <input type="hidden" name="currency_code" value="USD" />
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Subscribe" />
  </form>

这是控制台中的输出:

early_flush_waiting_for_second_chunk 
Object
client_elapsed
: 
3
event
: 
"early_flush_waiting_for_second_chunk"
level
: 
"info"
pageID
: 
25
req_elapsed
: 
1220
state
: 
"pre_bootstrap"
timestamp
: 
"1691655080674"
[[Prototype]]
: 
Object
ngrlCaptcha.min.js:1 
        
        
        POST https://www.sandbox.paypal.com/webapps/billing/api/billagmt/undefined/createCart 400

我尝试了各种方法并查看了各种论坛,但似乎没有任何作用。我尝试了其他按钮(立即购买),它们都正常工作。按钮和电子邮件链接都不起作用。我尝试过使用商业账户和个人账户。所有关联的电子邮件地址也都已验证!

英文:

I am facing a weird issue with PayPal sandbox.
I am trying to create a subscription button from https://sandbox.paypal.com/buttons but it's not working!

Here is the code that page generates.

&lt;form action=&quot;https://www.sandbox.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; target=&quot;_top&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_s-xclick&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;hosted_button_id&quot; value=&quot;F7H82MZZ8PFKL&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot; /&gt;
    &lt;input type=&quot;image&quot; src=&quot;https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif&quot; border=&quot;0&quot; name=&quot;submit&quot; title=&quot;PayPal - The safer, easier way to pay online!&quot; alt=&quot;Subscribe&quot; /&gt;
  &lt;/form&gt;

Here is the output in the console:

early_flush_waiting_for_second_chunk 
Object
client_elapsed
: 
3
event
: 
&quot;early_flush_waiting_for_second_chunk&quot;
level
: 
&quot;info&quot;
pageID
: 
25
req_elapsed
: 
1220
state
: 
&quot;pre_bootstrap&quot;
timestamp
: 
&quot;1691655080674&quot;
[[Prototype]]
: 
Object
ngrlCaptcha.min.js:1 
        
        
        POST https://www.sandbox.paypal.com/webapps/billing/api/billagmt/undefined/createCart 400

I have tried everything and went thru various forums, but nothing seems to be working. I have tried other buttons (Buy Now) and they are working fine.
The button nor the email link is working. I have tried from a business as well as personal accounts. All email addresses associated are also verified!

答案1

得分: 0

由于没有人能提供解决方案,我想发布一种解决方法。因此,解决此问题的方法是使用PayPal的智能订阅按钮,而不是订阅按钮。或者确切地说,使用JavaScript SDK。它们运作得非常完美。

我仍然对原始问题感到好奇。如果您知道,请提供一个合适的答案!

英文:

As nobody was able to provide a solution I will like to post the workaround. So, the work around to this thing is using paypal's smart subscribe buttons instead of subscribe button. Or JavaScript SDK to be exact. They are working perfectly.

I am still curious about the original question. So please provide a proper answer if you know!

huangapple
  • 本文由 发表于 2023年8月10日 16:28:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76873923.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定