2013-04-04 42 views
1

我正在使用这个小程序。我记得上一次我试图让它起作用时有一段荒谬的时间,然后他们改变了它!我试图导入我的旧用户,但它说密码不正确。您没有权限使用SOAP为DoDirectPaymentReq创建此API调用

下面是我张贴到https://api-3t.sandbox.paypal.com/2.0/此之前的所有工作的肥皂,它仍然是工作在生产环境,但每当我试图在沙箱中运行此我得到

LONGMESSAGE =你不有权进行此API调用 ERRORCODE = 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>[email protected]</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> 

回答

0

“用户名”和“主题”的值几乎完全匹配吗? ('_api1。'代替'@')?

如果它们不同并且意图不同,您可能需要做的是以“主题”身份登录到沙箱帐户,并向用户名授予第三方API权限。

如果它们没有不同,请尝试省略主题。如果这不会改变回应,您可以发布这些值吗?

+0

是的,他们做的,当我想,(甚至在你的建议),它给我的错误'你登录到此交易的API调用者帐户。请更改您的登录信息,然后再试一次。“ 在玩弄配置之后(如删除主题),我可以得到它给我一个不同的错误,即'由于商家配置无效,此事务无法处理。 大量的阅读/搜索意味着这是一个贝宝错误,其付款没有正确启用。我找不到任何地方启用它。 – 2013-04-05 14:40:33

+0

无效的商家配置通常意味着Pro未启用,是的。尝试在沙箱中创建一个新的商业帐户,并使用该用户的用户名/密码/签名进行测试 – 2013-04-07 18:08:18

+0

是的,我也尝试过,但无济于事。最终,我不得不联系他们让他们为我启用它。太蹩脚了。 – 2013-04-08 15:25:01

相关问题