我要和这个一起吃点东西。我记得上次我试图使它工作时有一个荒谬的时间,然后他们改变了它!我试图导入我的旧用户,但提示密码不正确。
下面是我要发布到https://api-3t.sandbox.paypal.com/2.0/的肥皂,所有这些以前都可以使用,并且仍然可以在生产环境中使用,但是每当我尝试在沙箱中运行它时,我都会得到
LONGMESSAGE =您无权进行此API调用
错误代码= 10002
似乎我记得这与未启用Paypal PaymentsPro有关。我尝试创建多个企业帐户,然后删除并重新实例化我的凭据。似乎没有任何效果,我在https://www.sandbox.paypal.com/站点中找不到任何地方可以启用它。信用卡是由沙盒个人用户生成的伪造卡,但我也使用企业帐户的信用卡进行了尝试,这没有什么区别。
谁能给我一些线索?这令人难以置信。
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" SOAP-ENV:mustUnderstand="1">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents">
<Username>business user from paypal sandbox</Username>
<Password>password from classic text api credentials</Password>
<Signature>api from new paypal sandbox business user</Signature>
<Subject>email of new paypal sandbox business user</Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<DoDirectPaymentReq xmlns="urn:ebay:api:PayPalAPI">
<DoDirectPaymentRequest xmlns="urn:ebay:api:PayPalAPI">
<Version xmlns="urn:ebay:apis:eBLBaseComponents">1.0</Version>
<DoDirectPaymentRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents">
<PaymentAction>Sale</PaymentAction>
<PaymentDetails>
<OrderTotal currencyID="USD">50.00</OrderTotal>
<ItemTotal currencyID="USD">50.00</ItemTotal>
<ShippingTotal currencyID="USD">0.00</ShippingTotal>
<HandlingTotal currencyID="USD">0.00</HandlingTotal>
<TaxTotal currencyID="USD">0.00</TaxTotal>
<OrderDescription>LOCAL - </OrderDescription>
<Custom>LOCAL - </Custom>
<InvoiceID>LOCAL - 1417</InvoiceID>
<PaymentItem>
<Name>Donation</Name>
<Number>28</Number>
<Quantity>1</Quantity>
<SalesTax currencyID="USD">0</SalesTax>
<Amount currencyID="USD">50.00</Amount>
</PaymentItem> </PaymentDetails>
<CreditCard>
<CreditCardType>Visa</CreditCardType>
<CreditCardNumber>4892645783103844</CreditCardNumber>
<ExpMonth>4</ExpMonth>
<ExpYear>2018</ExpYear>
<CardOwner>
<Payer>john_test@testuser.org</Payer>
<PayerID></PayerID>
<PayerStatus>1</PayerStatus>
<PayerName>
<FirstName>Test</FirstName>
<LastName>User</LastName>
</PayerName>
<PayerCountry>US</PayerCountry>
<PayerBusiness></PayerBusiness>
<Address><Name>Test User</Name>
<Street1>5555 W 55th St</Street1>
<Street2></Street2>
<CityName>Somewhere</CityName>
<StateOrProvince>IL</StateOrProvince>
<Country>US</Country>
<Phone>555-555-5555</Phone>
<PostalCode>55555</PostalCode>
</Address>
</CardOwner>
<CVV2>123</CVV2>
</CreditCard>
<IPAddress>my ip address</IPAddress>
<MerchantSessionId>z78m9bsliz7b7f7</MerchantSessionId>
</DoDirectPaymentRequestDetails>
</DoDirectPaymentRequest>
</DoDirectPaymentReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
最佳答案
“用户名”和“主题”的值几乎完全匹配吗? (用“ _api1。”代替“ @”)?
如果它们不同且有此目的,那么您可能要做的是以“主题”身份登录沙盒帐户,并向用户名授予第三方API权限。
如果它们没有不同,请尝试省略“主题”。如果那没有改变响应,您可以张贴值吗?
关于soap - 您无权使用SOAP for DoDirectPaymentReq进行此API调用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15817839/