您无权使用SOAP for DoDirectPaymentReq进行此API调用

时间:2013-04-04 17:30:19

标签: soap paypal paypal-sandbox

我对这个有点尴尬。我记得上次我试图让它工作时有一个荒谬的时间,然后他们改变了它!我试图导入我的旧用户,但它说密码不正确。

下面是我发布到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>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>

2 个答案:

答案 0 :(得分:0)

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

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

如果没有差异,请尝试省略主题。如果这没有改变响应,你可以发布值吗?

答案 1 :(得分:-1)