0

I tried to use paypal express checkout on my Magento 2 (2.3) site. I tried to use sandbox. On the checkout page, I select the paypal express checkout option. I can see the paypal login form popup and can login successfully. But after I click 'Pay' button and the popup is closed then I saw a flash error message on my M2 site.

PayPal gateway has rejected request. PaymentAction of Authorization is not allowed with Unilateral and Non-Credentialed authentication (#10481: Transaction refused because of an invalid argument. See additional error messages for details).

I inspected the log file in var/log/payment.log. I see the debug message but I have no idea what is wrong. Here is the debug message:

[2020-02-01 04:40:06] main.DEBUG: array (
  'url' => 'https://api-3t.sandbox.paypal.com/nvp',
  'DoExpressCheckoutPayment' => 
  array (
    'TOKEN' => 'EC-5TP478471D8088941',
    'PAYERID' => '5YLR7L3UWZK6Y',
    'PAYMENTACTION' => 'Authorization',
    'AMT' => '499.00',
    'CURRENCYCODE' => 'AUD',
    'BUTTONSOURCE' => 'Magento_Cart_Community',
    'NOTIFYURL' => 'https://xxx.com.au/paypal/ipn/',
    'RETURNFMFDETAILS' => 1,
    'SHIPPINGAMT' => '0.00',
    'ITEMAMT' => '499.00',
    'TAXAMT' => '0.00',
    'L_NUMBER0' => NULL,
    'L_NAME0' => '(CLEARANCE) Shoei J.O Hawker TC-1 Helmet - Red/Black',
    'L_QTY0' => 1,
    'L_AMT0' => '499.00',
    'BUSINESS' => NULL,
    'EMAIL' => 'xxx@yahoo.com',
    'FIRSTNAME' => 'First',
    'LASTNAME' => 'Last',
    'MIDDLENAME' => NULL,
    'SALUTATION' => NULL,
    'SUFFIX' => NULL,
    'COUNTRYCODE' => 'AU',
    'STATE' => 'NSW',
    'CITY' => 'Melbourne',
    'STREET' => 'Second Ave.',
    'ZIP' => '3000',
    'PHONENUM' => '0489 849 999',
    'SHIPTOCOUNTRYCODE' => 'AU',
    'SHIPTOSTATE' => 'NSW',
    'SHIPTOCITY' => 'Melbourne',
    'SHIPTOSTREET' => 'Second Ave.',
    'SHIPTOZIP' => '3000',
    'SHIPTOPHONENUM' => '0489 849 999',
    'SHIPTOSTREET2' => '',
    'STREET2' => '',
    'SHIPTONAME' => 'First Last',
    'ADDROVERRIDE' => 1,
    'METHOD' => 'DoExpressCheckoutPayment',
    'VERSION' => '72.0',
    'USER' => '****',
    'PWD' => '****',
    'SIGNATURE' => '****',
  ),
  'response' => 
  array (
    'TOKEN' => 'EC-5TP478471D8088941',
    'SUCCESSPAGEREDIRECTREQUESTED' => 'false',
    'TIMESTAMP' => '2020-02-01T04:40:05Z',
    'CORRELATIONID' => '577d54e9fc5fa',
    'ACK' => 'Failure',
    'VERSION' => '72.0',
    'BUILD' => '54085969',
    'L_ERRORCODE0' => '10481',
    'L_SHORTMESSAGE0' => 'Transaction refused because of an invalid argument. See additional error messages for details.',
    'L_LONGMESSAGE0' => 'PaymentAction of Authorization is not allowed with Unilateral and Non-Credentialed authentication.',
    'L_SEVERITYCODE0' => 'Error',
  ),
)

I'd really appreciate if anybody can help. Thanks

1
  • I'm having an exact issue. have you found a solution to this? – Tora Feb 21 '20 at 8:46
0

Make sure your sandbox merchant email is verified.

The propper steps to make your sandbox credentials are as follows:

  1. Log into Dashboard (https://developer.paypal.com/) and type your PayPal personal or business account email and password. Note: If you do not have an account, click Sign Up.
  2. Under Sandbox, click Accounts and click Create Account.
  3. To create the buyer account, select the personal account type. Type these required and any optional fields and click Create Account: Email Address. A fake or valid email address. If you use a valid address, you receive email notifications when you run test transactions. Password. An easy-to-remember password, such as 12345678. PayPal Balance. A high amount, such as 5000.
  4. To create the merchant account, select the business account type, type account information, and click Create Account.

In the sandbox account created in this way, the account authentication status, funds, credit card, bank account, etc. will be pre-set for you, no need to operate again.

I had the same problem after creating my sandbox account through the Magento "Sandbox Credentials" button and PayPal support suggested this. Once I went through the steps and changed my API credentials in Magento to match the newly created ones, it all worked OK.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.