IanT8
IanT8

Reputation: 2217

DoExpressCheckoutPayment returns error 11623

I'm new to the PayPal API. I'm getting an error calling DoExpressCheckoutPayment. The error is 11623 "This account is not approved for the authorization service.". Is it normal for a sandbox account to not work and require some additional non-obvious set-up steps?

In my test app, the calls to SetExpressCheckout and GetExpressCheckoutDetails seem to work. I'm using C# and the PayPal Merchant SDK (2.7.109.0) NuGet package which is dependent on PayPalCoreSDK 1.4.1.0. I'm using an C# object-based API which according to fiddler2, sends/receives SOAP messages to the PayPal sandbox URL.

Here's the full series of request/response messages serialized to XML (note I'm not sending/receiving these XML documents directly, I've simply serialized the request/response objects to get a sense of what the API accepts and returns.

<?xml version="1.0" encoding="utf-16"?>
<SetExpressCheckoutReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SetExpressCheckoutRequest>
    <DetailLevel />
    <Version>104.0</Version>
    <SetExpressCheckoutRequestDetails>
      <ReturnURL>http://localhost:50405/PayPalOrderComplete.aspx</ReturnURL>
      <CancelURL>http://localhost:50405/PayPalOrderCanceled.aspx</CancelURL>
      <PaymentAction xsi:nil="true" />
      <SolutionType xsi:nil="true" />
      <LandingPage xsi:nil="true" />
      <ChannelType xsi:nil="true" />
      <BillingAgreementDetails />
      <PromoCodes />
      <ProductCategory xsi:nil="true" />
      <ShippingMethod xsi:nil="true" />
      <OtherPaymentMethods />
      <PaymentDetails>
        <PaymentDetailsType>
          <OrderTotal>
            <currencyID>USD</currencyID>
            <value>1.00</value>
          </OrderTotal>
          <ButtonSource>PayPal_SDK</ButtonSource>
          <PaymentCategoryType xsi:nil="true" />
          <ShippingMethod xsi:nil="true" />
          <PaymentDetailsItem>
            <PaymentDetailsItemType>
              <Name>item</Name>
              <Quantity>1</Quantity>
              <Amount>
                <currencyID>USD</currencyID>
                <value>1.00</value>
              </Amount>
              <ProductCategory xsi:nil="true" />
              <ItemCategory>PHYSICAL</ItemCategory>
            </PaymentDetailsItemType>
          </PaymentDetailsItem>
          <AllowedPaymentMethod xsi:nil="true" />
          <PaymentAction>SALE</PaymentAction>
          <BranchLevel xsi:nil="true" />
          <Recurring xsi:nil="true" />
          <PaymentReason xsi:nil="true" />
        </PaymentDetailsType>
      </PaymentDetails>
      <FlatRateShippingOptions />
      <SurveyChoice />
      <TotalType xsi:nil="true" />
      <Incentives />
      <CoupledBuckets />
    </SetExpressCheckoutRequestDetails>
  </SetExpressCheckoutRequest>
</SetExpressCheckoutReq>

<?xml version="1.0" encoding="utf-16"?>
<SetExpressCheckoutResponseType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Timestamp>2014-05-01T20:57:21Z</Timestamp>
  <Ack>SUCCESS</Ack>
  <CorrelationID>6d48820c828cf</CorrelationID>
  <Errors />
  <Version>104.0</Version>
  <Build>10800277</Build>
  <Token>EC-51L81221B55825817</Token>
</SetExpressCheckoutResponseType>

<?xml version="1.0" encoding="utf-16"?>
<GetExpressCheckoutDetailsReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <GetExpressCheckoutDetailsRequest>
    <DetailLevel />
    <Version>104.0</Version>
    <Token>EC-51L81221B55825817</Token>
  </GetExpressCheckoutDetailsRequest>
</GetExpressCheckoutDetailsReq>

<?xml version="1.0" encoding="utf-16"?>
<GetExpressCheckoutDetailsResponseType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Timestamp>2014-05-01T20:58:49Z</Timestamp>
  <Ack>SUCCESS</Ack>
  <CorrelationID>b1afb2282b2f2</CorrelationID>
  <Errors />
  <Version>104.0</Version>
  <Build>10800277</Build>
  <GetExpressCheckoutDetailsResponseDetails>
    <Token>EC-51L81221B55825817</Token>
    <PayerInfo>
      <Payer>[email protected]</Payer>
      <PayerID>B7QPX4VTH7CEU</PayerID>
      <PayerStatus>VERIFIED</PayerStatus>
      <PayerName>
        <FirstName>Ian</FirstName>
        <LastName>Taite</LastName>
      </PayerName>
      <PayerCountry>NZ</PayerCountry>
      <Address>
        <Name>Ian Taite</Name>
        <Street1>123 Sample St</Street1>
        <CityName>Wellington</CityName>
        <Country>NZ</Country>
        <CountryName>New Zealand</CountryName>
        <PostalCode>6004</PostalCode>
        <AddressOwner>PAYPAL</AddressOwner>
        <AddressStatus>UNCONFIRMED</AddressStatus>
        <AddressNormalizationStatus xsi:nil="true" />
      </Address>
    </PayerInfo>
    <BillingAgreementAcceptedStatus xsi:nil="true" />
    <CheckoutStatus>PaymentActionNotInitiated</CheckoutStatus>
    <PaymentDetails>
      <PaymentDetailsType>
        <OrderTotal>
          <currencyID>USD</currencyID>
          <value>1.00</value>
        </OrderTotal>
        <ItemTotal>
          <currencyID>USD</currencyID>
          <value>1.00</value>
        </ItemTotal>
        <ShippingTotal>
          <currencyID>USD</currencyID>
          <value>0.00</value>
        </ShippingTotal>
        <HandlingTotal>
          <currencyID>USD</currencyID>
          <value>0.00</value>
        </HandlingTotal>
        <TaxTotal>
          <currencyID>USD</currencyID>
          <value>0.00</value>
        </TaxTotal>
        <ButtonSource>PayPal_SDK</ButtonSource>
        <ShipToAddress>
          <Name>Ian Taite</Name>
          <Street1>123 Sample St</Street1>
          <CityName>Wellington</CityName>
          <Country>NZ</Country>
          <CountryName>New Zealand</CountryName>
          <PostalCode>6004</PostalCode>
          <AddressOwner>PAYPAL</AddressOwner>
          <AddressStatus>UNCONFIRMED</AddressStatus>
          <AddressNormalizationStatus>NONE</AddressNormalizationStatus>
        </ShipToAddress>
        <PaymentCategoryType xsi:nil="true" />
        <ShippingMethod xsi:nil="true" />
        <PaymentDetailsItem>
          <PaymentDetailsItemType>
            <Name>item</Name>
            <Quantity>1</Quantity>
            <Tax>
              <currencyID>USD</currencyID>
              <value>0.00</value>
            </Tax>
            <Amount>
              <currencyID>USD</currencyID>
              <value>1.00</value>
            </Amount>
            <ProductCategory xsi:nil="true" />
            <ItemCategory>PHYSICAL</ItemCategory>
          </PaymentDetailsItemType>
        </PaymentDetailsItem>
        <InsuranceTotal>
          <currencyID>USD</currencyID>
          <value>0.00</value>
        </InsuranceTotal>
        <ShippingDiscount>
          <currencyID>USD</currencyID>
          <value>0.00</value>
        </ShippingDiscount>
        <InsuranceOptionOffered>false</InsuranceOptionOffered>
        <AllowedPaymentMethod xsi:nil="true" />
        <PaymentAction xsi:nil="true" />
        <BranchLevel xsi:nil="true" />
        <Recurring xsi:nil="true" />
        <PaymentReason xsi:nil="true" />
      </PaymentDetailsType>
    </PaymentDetails>
    <IncentiveDetails />
    <SurveyChoiceSelected />
    <PaymentRequestInfo>
      <PaymentRequestInfoType />
    </PaymentRequestInfo>
  </GetExpressCheckoutDetailsResponseDetails>
</GetExpressCheckoutDetailsResponseType>

<?xml version="1.0" encoding="utf-16"?>
<DoExpressCheckoutPaymentReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DoExpressCheckoutPaymentRequest>
    <DetailLevel />
    <DoExpressCheckoutPaymentRequestDetails>
      <PaymentAction xsi:nil="true" />
      <Token>EC-51L81221B55825817</Token>
      <PayerID>B7QPX4VTH7CEU</PayerID>
      <PaymentDetails>
        <PaymentDetailsType>
          <OrderTotal>
            <currencyID>USD</currencyID>
            <value>1.00</value>
          </OrderTotal>
          <ButtonSource>PayPal_SDK</ButtonSource>
          <PaymentCategoryType xsi:nil="true" />
          <ShippingMethod xsi:nil="true" />
          <PaymentDetailsItem />
          <AllowedPaymentMethod xsi:nil="true" />
          <SellerDetails>
            <PayPalAccountID>paypal.merchant1_api1.iantaite.com</PayPalAccountID>
          </SellerDetails>
          <PaymentAction>ORDER</PaymentAction>
          <PaymentRequestID>PaymentRequest1</PaymentRequestID>
          <BranchLevel xsi:nil="true" />
          <Recurring xsi:nil="true" />
          <PaymentReason xsi:nil="true" />
        </PaymentDetailsType>
      </PaymentDetails>
      <SurveyChoiceSelected />
      <ButtonSource>PayPal_SDK</ButtonSource>
      <SkipBACreation xsi:nil="true" />
      <CoupledBuckets />
    </DoExpressCheckoutPaymentRequestDetails>
    <ReturnFMFDetails xsi:nil="true" />
  </DoExpressCheckoutPaymentRequest>
</DoExpressCheckoutPaymentReq>

<?xml version="1.0" encoding="utf-16"?>
<DoExpressCheckoutPaymentResponseType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Timestamp>2014-05-01T20:58:50Z</Timestamp>
  <Ack>FAILURE</Ack>
  <CorrelationID>a8d913d3b7c8e</CorrelationID>
  <Errors>
    <ErrorType>
      <ShortMessage>This account is not approved for the authorization service.</ShortMessage>
      <LongMessage>This account is not approved for the authorization service. To enable this service, contact PayPal customer service</LongMessage>
      <ErrorCode>11623</ErrorCode>
      <SeverityCode>ERROR</SeverityCode>
      <ErrorParameters />
    </ErrorType>
  </Errors>
  <Version>109.0</Version>
  <Build>10800277</Build>
</DoExpressCheckoutPaymentResponseType>

Upvotes: 1

Views: 539

Answers (1)

Aaron
Aaron

Reputation: 1271

The problem is you are specifying SALE as the PaymentAction in your SetExpressCheckout then specifying ORDER in your DoExpressCheckout .. it needs to be SALE if you specify that in the Set call.

From the Developer Site:

You cannot set this field to Sale in SetExpressCheckout request and then change the value to Authorization or Order in the request. If you set the field to Authorization or Order in SetExpressCheckout, you may set the field to Sale.

Upvotes: 2

Related Questions