- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前正在将 PayPal Express Checkout 集成到我们的网站中。我们正在使用 osCommerce (PHP) 的安装和 setExpressCheckout 的 SOAP 实现。令人费解的是,我的 Express Checkouts 代码在我的本地环境中正常工作。
但是;在委托(delegate)给我们的开发服务器后,Express Checkout 的相同代码不再有效。
下面是我的本地开发环境向 PayPal 沙盒端点发起的用于快速结账的成功 SOAP 请求。
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents">
<Username>xxxxxxxxxxxxxxxxxxxxxxxxxxx</Username>
<Password>xxxxxxxxxxxxxxxx</Password>
</Credentials>
</RequesterCredentials>
</soap:Header>
<soap:Body>
<SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI">
<SetExpressCheckoutRequest>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">98.0</Version>
<SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents">
<ReturnURL>http://localhost/checkout_shipping.php?action=express_checkout&site=xxxxx</ReturnURL>
<CancelURL>http://localhost/checkout_shipping.php?ec_cancel=1&site=xxxxx</CancelURL>
<ReqConfirmShipping>1</ReqConfirmShipping>
<NoShipping>0</NoShipping>
<AddressOverride>0</AddressOverride>
<LocaleCode>US</LocaleCode>
<PageStyle></PageStyle>
<cpp-header-image></cpp-header-image>
<cpp-header-border-color></cpp-header-border-color>
<cpp-header-back-color></cpp-header-back-color>
<cpp-payflow-color></cpp-payflow-color>
<PaymentAction>Sale</PaymentAction>
<PaymentDetails>
<OrderTotal currencyID="USD">6.47</OrderTotal>
<ItemTotal currencyID="USD">2.48</ItemTotal>
<ShippingTotal currencyID="USD">3.99</ShippingTotal>
<HandlingTotal currencyID="USD"></HandlingTotal>
<TaxTotal currencyID="USD">0</TaxTotal>
<Custom>Phone: xxxxxxxxxx -- Email: xxxx.xxxxx@gmail.com</Custom>
<InvoiceID></InvoiceID>
<NotifyURL></NotifyURL>
<ButtonSource>PAYPAL_BUTTON_SOURCE</ButtonSource>
<ShipToAddress>
<Name></Name>
<Street1>xxxx Park Forest Circle</Street1>
<Street2></Street2>
<CityName>Clermont</CityName>
<StateOrProvince>OH</StateOrProvince>
<PostalCode>xxx03</PostalCode>
<Country>US</Country>
</ShipToAddress>
<PaymentDetailsItem><Name>Product XYZ</Name><Amount currencyID="USD">2.48</Amount><Number>-</Number><Quantity>1</Quantity></PaymentDetailsItem>
</PaymentDetails>
</SetExpressCheckoutRequestDetails>
</SetExpressCheckoutRequest>
</SetExpressCheckoutReq>
</soap:Body>
</soap:Envelope>
下面是我从 API 端点检索到的响应
<?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">
<SetExpressCheckoutResponse xmlns="urn:ebay:api:PayPalAPI">
<Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2013-03-27T18:46:35Z</Timestamp>
<Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
<CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">cca293672cf33</CorrelationID>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">98.0</Version>
<Build xmlns="urn:ebay:apis:eBLBaseComponents">5551055</Build>
<Token xsi:type="ebl:ExpressCheckoutTokenType">EC-2CM343011B950025M</Token>
</SetExpressCheckoutResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
但是,如果我从 DEV 服务器发起相同类型的交易;这将导致失败。在下面找到从我们的开发服务器发起的请求的 var_dump()
Array (
[PAYPAL_ORDER_TOTAL] => 7.84
[PAYPAL_ORDER_DESCRIPTION] => Order placed on April 2, 2013, 9:30 am by xxxx xxxxx (ID: xxxxx)
[PAYPAL_CUSTOM] => Phone: xxxxxxxxxx -- Email: xxxx.xxxxx@gmail.com
[PAYPAL_SHIPPING_TOTAL] => 0
[PAYPAL_HANDLING_TOTAL] =>
[PAYPAL_TAX_TOTAL] => 0
[PAYPAL_ITEM_TOTAL] => 7.84
[PAYMENT_DETAILS_ITEM] => Product XYZ
[PAYPAL_SHIPPING_NAME] =>
[PAYPAL_SHIPPING_ADDRESS1] => xxxx Rainbow Springs Ct
[PAYPAL_SHIPPING_ADDRESS2] =>
[PAYPAL_SHIPPING_CITY] => Louisville
[PAYPAL_SHIPPING_STATE] => KY
[PAYPAL_SHIPPING_ZIP] => 40213
[PAYPAL_SHIPPING_COUNTRY] => US
[PAYPAL_NOTIFY_URL] =>
[PAYPAL_INVOICE_ID] =>
[PAYPAL_PAGE_STYLE] =>
[PAYPAL_CPP_HEADER_IMAGE] =>
[PAYPAL_CPP_HEADER_BORDER_COLOR] =>
[PAYPAL_CPP_HEADER_BACK_COLOR] =>
[PAYPAL_CPP_PAYFLOW_COLOR] =>
[PAYPAL_RETURN_URL] => http://wpp_mod.testosc.storename.com/checkout_shipping.php?action=express_checkout&site=xxxxx
[PAYPAL_CANCEL_URL] => http://wpp_mod.testosc.storename.com/checkout_shipping.php?ec_cancel=1&site=xxxxx
[PAYPAL_REQUIRE_CONFIRM_SHIPPING] => 1
[PAYPAL_LOCALE_CODE] => US
[PAYPAL_NO_SHIPPING] => 0
[PAYPAL_ADDRESS_OVERRIDE] => 0
)
此请求导致以下响应(同样,返回的 var_dump()):
Array (
[Security] =>
[RequesterCredentials] =>
Array ( [0] =>
Array (
[Credentials] =>
Array ( [0] =>
Array (
[Username] =>
[Password] =>
[Signature] =>
[Subject] =>
)
)
)
)
[SetExpressCheckoutResponse] =>
Array ( [0] =>
Array (
[Timestamp] => 2013-04-02T14:30:46Z
[Ack] => Failure
[CorrelationID] => 44f876829f4cb
[Errors] =>
Array ( [0] => Array (
[ShortMessage] => Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] => ReturnURL is invalid.
[ErrorCode] => 10471
[SeverityCode] => Error )
[1] => Array (
[ShortMessage] => Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] => CancelURL is invalid.
[ErrorCode] => 10472
[SeverityCode] => Error )
)
[Version] => 98.0
[Build] => 5613839
)
)
)
检查 PayPal API 文档后 setExpressCheckout就 API 端点在有效 URL 中查找的内容而言,我找不到任何特定的指南。
我还检查了SO1和 SO2但没有看到与我的特定问题有关的任何内容。
如果有人知道 RETURN 和 CANCEL URL 可能有什么问题,或者更详细地解释 setExpressCheckout API 的正确格式的 URL,那将是最有帮助的。
最佳答案
似乎 PayPal API 端点不喜欢域/url 中的下划线,因此:
http://localhost/checkout_shipping.php?action=express_checkout&site=xxxxx
有效但是这个
http://wpp_mod.testosc.storename.com/checkout_shipping.php?action=express_checkout&site=xxxxx
不是;因为我们开发服务器的域名中有一个下划线。这是不方便但可以纠正的。
关于php - 由于 RETURN 和 CANCEL URL 无效,PayPal setExpressCheckout 调用失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15767718/
当我对 PayPal 实时服务器进行 SetExpressCheckout API 调用时,我收到以下错误:“您没有注册接受数字交付商品的付款。” 该错误非常清楚地表明我应该从我的企业 PayPal
我正在研究 paypal api soap 方法。在进入实时模式时,我对数字商品有疑问。我们出售虚拟货币。在 paypal setExpressCheckout 上出现错误: You are not
调用 PayPal API SetExpressCheckout 方法获取支付链接并将客户转发到那里而不是使用支付按钮有什么好处? 最佳答案 访问者的浏览器客户端可以修改 PayPal 按钮。它只是基
由于 API 一直在变化,我尝试向开发人员测试业务付款时,我收到如下错误: array ( 'TIMESTAMP' => '2013-04-04T21:30:54Z', 'CORRELATIO
有什么方法可以通知我有人已通过 SetExpressCheckout 批准付款,如果他们没有被重定向回我的网站? 即。在他们批准付款后,我会收到回电或付款通知。 如果是这样,我该怎么做? 谢谢。 最佳
我有下面的代码可以从 paypal 获取 token ,但不知何故 paypal 一直向我发送错误消息,提示购物车商品总数与订单金额不符。我在这里做错了什么?
我创建了我的支付系统,并在 SetExpressCheckout AMT 参数中设置了一个变量,因为价格可能会发生变化。所以在 DoExpressCheckoutPayment 参数中我们也需要金额,
我有一些代码可以为 Paypal 构建请求 URL,但在某些项目上它返回以下错误(在响应转换为数组后): Array ( [TIMESTAMP] => 2012-08-15T14:23:10Z
我正在请求来自 paypal 的 setExpressCheckout 调用,我收到了错误代码 10413。在我从项目总额中扣除税款并将 &PAYMENTREQUEST_0_TAXAMT 添加到请求中
您好,有人可以帮我处理代码吗?我在处理我的网页时收到此错误: SetExpressCheckout API 调用失败。详细错误消息:安全 header 无效简短错误消息:安全错误错误代码:10002错
这个问题在这里已经有了答案: What is a NullReferenceException, and how do I fix it? (26 个答案) 关闭 3 年前。
当我尝试设置 ExpressCheckout 时,我得到 ack = success 但没有返回 token 。 paypal api的版本是87.0这里是 wsdl 链接:https://www.s
我正在使用 PayPal 的 API 通过 SetExpressCheckout 方法处理付款。 $requestParams = array( 'RETURNURL' => 'SUCCESS_
我在使用 PayPal 的 SetExpressCheckout 时遇到一些问题。我正在尝试为一件值(value) 11.96 欧元(含 21% 的增值税)的商品设置新的快速结账。但是,PayPal
我被困住了,需要有人为我指明正确的方向。 在本地主机上运行良好,但当我推送到我们数据中心(使用沙箱设置)中站点的测试版本时失败。我正在为 c# 使用 SDK 版本 2.1.96。有什么想法吗? 谢谢
好吧,PayPal 的文档和示例非常糟糕,所以我希望其他人可以帮助我解决这个问题。我正在使用他们的 NVP API 执行 PayPal SetExpressCheckout 请求。似乎我的代码产生的是
我在沙盒帐户中使用 setExpressCheckout 方法的 Expresscheckout 期间收到以下错误。我正在使用 SOAP 库 paypal_base.jar、paypal_stubs.
我有最新的 nvp sdk for java (76.0),我是否通过以下方式将参数发送到 paypal: NVPEncoder encoder = new NVPEncoder(); encoder
很抱歉这个简单的问题,但 Paypal 文档太可怕了。我正在将 paypal 集成到 flash 游戏中,并将数字商品 API 与 Paypal 快速结账结合使用。我的虚拟商品页面展示了 4 种不同的
以下是与 PayPal API 相关的问题。我正在使用 PayPal Express Checkout,我正在将其与 .NET 一起使用。 通过我们的软件,用户可以通过两种不同的方式使用 PayPal
我是一名优秀的程序员,十分优秀!