0

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

我使用了 git hub 中的 buttonmanager-sdk-dotnet,并且按钮代码生成正常,如肥皂响应中所示。对于生成“立即购买”按钮,似乎可以,我可以单击并查看贝宝的付款页面而不是错误页面。

这真的让我很困惑。谁能帮我?

谢谢!

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

2 回答 2

0

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

于 2013-04-10T23:49:37.173 回答
0

尝试使用以下行而不是您当前使用的行

<form target="_top" action="https://www.paypal.com/cgi-bin/webscr" method="post">
于 2013-03-26T13:24:32.093 回答