2

In using paypal express chackout via "NVP http api" and I need to customize the gateway page locale. Following the doc I tried:

LOCALECODE=ES
(but also checked using es_ES, en_US, ecc..)

The problem is that it always show the gateway in italian (I think it consider only the current merchant address). This on Sandbox and Live env. too.

Now, I also read about this "Localizing the buyer's checkout experience in Express Checkout", where we can read:

The following are all taken into consideration to determine the locale of the checkout page:

  1. The shipping address country provided by the merchant in the SetExpressCheckout request.
  2. The country taken from the LocaleCode parameter passed by the merchant.
  3. The country of the currently logged-in user.
  4. The merchant's country.

the request is:

    array:18 [▼
      "USER" => "paypal-xxxxx"
      "PWD" => "xxxxxx"
      "SIGNATURE" => "xxxxx"
      "VERSION" => 123
      "METHOD" => "SetExpressCheckout"
      "L_PAYMENTREQUEST_0_NAME0" => "my product"
      "L_PAYMENTREQUEST_0_AMT0" => "364.78"
      "L_PAYMENTREQUEST_0_QTY0" => 1
      "PAYMENTREQUEST_0_ITEMAMT" => 364.78
      "PAYMENTREQUEST_0_AMT" => 364.78
      "PAYMENTREQUEST_0_PAYMENTACTION" => "Sale"
      "PAYMENTREQUEST_0_CURRENCYCODE" => "EUR"
      "PAYMENTREQUEST_0_DESC" => "customer #64637 Schowalter..."
      "PAYMENTREQUEST_0_INVNUM" => "#64637"
      "NOSHIPPING" => 1
      "RETURNURL" => "http://mydomain.es/payment/success/64637"
      "CANCELURL" => "http://mydomain.es"
      "LOCALECODE" => "ES"
    ]

the endpoint is:

    https://api-3t.sandbox.paypal.com/nvp

someone an help? just want to use spanish, because the website is spanish.

Felice Ostuni
  • 1,049
  • 1
  • 12
  • 20

1 Answers1

2

I don't know why but now it works, the correct LOCALECODE is the "full locale" so:

LOCALECODE=es_ES

I can only think that there is some kind of latency on sandbox.. after 3 tries, with "es_ES" finally the gateway is in spanish.

Felice Ostuni
  • 1,049
  • 1
  • 12
  • 20
  • 2
    I can confirm that both in sandbox and production there is weird behavior of the LOCALECODE option not being taken into account at all or taken from previous requests in first 20 or so pay attempts, but at some point it converges to normality. – Epigene Aug 17 '17 at 14:28