簡體   English   中英

1002錯誤API調用Paypal沙箱

[英]1002 Error API call paypal sandbox

我創建了一個貝寶沙箱帳戶,並創建了一個用戶,並且我擁有所有憑據,盡管使用了正確的憑據,但它反復引發以下錯誤

您無權進行此API調用

我發現了無數鏈接,但無法解決問題,我有點卡在這里

請求是

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:ebay:api:PayPalAPI" 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>pz.al2_api1.digitalavenues.com</ebl:Username>
        <ebl:Password>5HDDMdfdYT538MXCB34</ebl:Password>
        <ebl:Signature>A1Cl8ovwuXUVbVcsdsdfsdhDJyJaZGdRfsdfsd8yArLYlQIyV4MEX7pevhg7qkdEdKl8</ebl:Signature>
        <ebl:Subject>testSubject</ebl:Subject>
      </ebl:Credentials>
    </ns:RequesterCredentials>
  </soapenv:Header>
  <soapenv:Body>
    <ns:CreateRecurringPaymentsProfileReq>
      <ns:CreateRecurringPaymentsProfileRequest>
        <ebl:Version>117.0</ebl:Version>
        <ebl:CreateRecurringPaymentsProfileRequestDetails>
          <ebl:CreditCard>
            <ebl:CreditCardType>Visa</ebl:CreditCardType>
            <ebl:CreditCardNumber>4917760970795152</ebl:CreditCardNumber>
            <ebl:ExpMonth>12</ebl:ExpMonth>
            <ebl:ExpYear>2014</ebl:ExpYear>
            <ebl:CVV2>962</ebl:CVV2>
          </ebl:CreditCard>
          <ebl:RecurringPaymentsProfileDetails>
            <ebl:BillingStartDate>2014-12-31T14:43:39T00:00:00:000Z</ebl:BillingStartDate>
          </ebl:RecurringPaymentsProfileDetails>
          <ebl:ScheduleDetails>
            <ebl:Description>Description</ebl:Description>
            <ebl:TrialPeriod>
              <ebl:BillingPeriod>Day</ebl:BillingPeriod>
              <ebl:BillingFrequency>1</ebl:BillingFrequency>
              <ebl:TotalBillingCycles>2</ebl:TotalBillingCycles>
              <ebl:Amount currencyID="USD">2.0</ebl:Amount>
            </ebl:TrialPeriod>
            <ebl:PaymentPeriod>
              <ebl:BillingPeriod>Day</ebl:BillingPeriod>
              <ebl:BillingFrequency>1</ebl:BillingFrequency>
              <ebl:TotalBillingCycles>8</ebl:TotalBillingCycles>
              <ebl:Amount currencyID="USD">5.0</ebl:Amount>
            </ebl:PaymentPeriod>
            <ebl:MaxFailedPayments>3</ebl:MaxFailedPayments>
            <ebl:AutoBillOutstandingAmount>NoAutoBill</ebl:AutoBillOutstandingAmount>
          </ebl:ScheduleDetails>
        </ebl:CreateRecurringPaymentsProfileRequestDetails>
      </ns:CreateRecurringPaymentsProfileRequest>
    </ns:CreateRecurringPaymentsProfileReq>
  </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">
    <CreateRecurringPaymentsProfileResponse xmlns="urn:ebay:api:PayPalAPI">
      <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2014-12-31T09:13:44Z</Timestamp>
      <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Failure</Ack>
      <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">4c2815502399a</CorrelationID>
      <Errors xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:ErrorType">
        <ShortMessage xsi:type="xs:string">Authentication/Authorization Failed</ShortMessage>
        <LongMessage xsi:type="xs:string">You do not have permissions to make this API call</LongMessage>
        <ErrorCode xsi:type="xs:token">10002</ErrorCode>
        <SeverityCode xmlns="urn:ebay:apis:eBLBaseComponents">Error</SeverityCode>
      </Errors>
      <Version xmlns="urn:ebay:apis:eBLBaseComponents">117.0</Version>
      <Build xmlns="urn:ebay:apis:eBLBaseComponents">13630372</Build>
      <CreateRecurringPaymentsProfileResponseDetails xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:CreateRecurringPaymentsProfileResponseDetailsType">
        <ProfileID xsi:type="xs:string">
        </ProfileID>
        <TransactionID xsi:type="xs:string">
        </TransactionID>
      </CreateRecurringPaymentsProfileResponseDetails>
    </CreateRecurringPaymentsProfileResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

請指教

謝謝

即使代碼中顯示了用戶名,密碼和簽名,也需要確保您的代碼已將憑據傳遞給PayPal。 沒有將所有三個參數都傳遞給PayPal也是此錯誤消息的原因之一。 您可以在這里發布:

PayPal Classic API對一個呼叫進行身份驗證,但對下一個呼叫則不進行身份驗證

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM