"Pay Now"按钮在按钮管理器-sdk-dotnet SDK 示例项目中不起作用



我想知道什么是错误的"Pay Now"按钮与以下代码。在我点击它之后,它显示了来自网站(https://securepayments.sandbox.paypal.com/cgi-bin/webscr)的错误信息"error Processing Payment"。

我使用了git集线器中的buttonmanager-sdk-dotnet,按钮代码生成正常,如soap响应所示。对于生成"立即购买"按钮,似乎没问题,我可以点击并看到paypal的支付页面,而不是错误页面。

我真的很困惑。有人能帮我吗?

谢谢!

<form target="_top" action="https://securepayments.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="HSS-BswQHPdTagwZHwncBBJAK6K0RKijQJ91">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
</form>

soap请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:ebay:api:smileytongue:ayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes"><soapenv:Header><ns:RequesterCredentials><ebl:Credentials><ebl:Username>jb-us-seller_api1.paypal.com</ebl:Username><ebl:smileytongue:assword>WX4WTU3S8MY44S7F</ebl:smileytongue:assword><ebl:smileyfrustrated:ignature>AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy</ebl:smileyfrustrated:ignature></ebl:Credentials></ns:RequesterCredentials></soapenv:Header><soapenv:Body><ns:BMCreateButtonReq><ns:BMCreateButtonRequest><ebl:Version>98.0</ebl:Version><ns:ButtonType>PAYMENT</ns:ButtonType><ns:ButtonCode>TOKEN</ns:ButtonCode><ns:ButtonVar>item_name=Widget</ns:ButtonVar><ns:ButtonVar>return=</ns:ButtonVar><ns:ButtonVar>business=jb-us-seller_paypal.com</ns:ButtonVar><ns:ButtonVar>notify_url=</ns:ButtonVar><ns:ButtonVar>subtotal=2.00</ns:ButtonVar></ns:BMCreateButtonRequest></ns:BMCreateButtonReq></soapenv:Body></soapenv:Envelope>

soap响应:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI"><SOAP-ENV:Header><Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"></Security><RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType"><Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType"><Username xsi:type="xs:string"></Username><Password xsi:type="xs:string"></Password><Signature xsi:type="xs:string"></Signature><Subject xsi:type="xs:string"></Subject></Credentials></RequesterCredentials></SOAP-ENV:Header><SOAP-ENV:Body id="_0"><BMCreateButtonResponse xmlns="urn:ebay:api:PayPalAPI"><Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2013-03-26T00:47:07Z</Timestamp><Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack><CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">4077039977e32</CorrelationID><Version xmlns="urn:ebay:apis:eBLBaseComponents">98.0</Version><Build xmlns="urn:ebay:apis:eBLBaseComponents">5479129</Build><Website xsi:type="xs:string"><form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="jb-us-seller@paypal.com"><input type="hidden" name="item_name" value="Widget"><input type="hidden" name="button_subtype" value="products"><input type="hidden" name="bn" value="TWLK53YN7GDM6:PP-BuyNowBF_P"><input type="hidden" name="no_note" value="0"><input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form></Website><Email xsi:type="xs:string">https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=jb%2dus%2dseller%40paypal%2ecom&item_name=Widget&button_subtype=products&bn=TWLK53YN7GDM6%3aPP%2dBuyNowBF_P&no_note=0</Email></BMCreateButtonResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

尝试使用以下行代替当前使用的行

<form target="_top" action="https://www.paypal.com/cgi-bin/webscr" method="post">

我使用了Buy Now按钮。我希望PayPal的文档可以更清晰。

相关内容

  • 没有找到相关文章

最新更新