“立即付款”按钮在buttonmanager-sdk-dotnet SDK示例项目中不起作用

时间:2013-03-26 01:47:39

标签: paypal paypal-sandbox

我想知道“立即付款”按钮有什么问题,并带有以下代码。点击它后,它会显示网站上的错误消息“处理付款错误”(https://securepayments.sandbox.paypal.com/cgi-bin/webscr)。

我使用了git hub中的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>

肥皂要求:

<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>
肥皂反应:

<?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>

2 个答案:

答案 0 :(得分:0)

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

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

答案 1 :(得分:0)

我设法使用“立即购买”按钮。我希望PayPal文档可以更清晰。