Country code not according to ISO 639-1 causes error in order

Created on 5 November 2020, about 4 years ago
Updated 16 May 2024, 6 months ago

Problem/Motivation

Hello and thank you very much for your module, sadly soon after I begin testing I found that the module supplies country code instead of ISO 639-1 language code required by PayU(?), thus resulting in error:

Error with payu order payment: ERROR_VALUE_INVALID - field: buyer.language, incorrect value: cz, must be a valid ISO 639-1 two-letter language code (e.g. 'cs'), country codes are not accepted (e.g. 'CZ')

Steps to reproduce

0. install Drupal where country code differs from ISO 639-1 - E. g. czech - cz / cs
1. Install the module using composer and enable in modules
2. Configure the information given by PayU
3. Attempt to pay an order, error is reported, asking to contact administrator.

Proposed resolution

- Figure out a quick easy fix to be able to overcome this particular issue, gather info
- Implement better solution in PayuPaymentForm.php, line 126 and 132

User interface changes

- None

API changes

Data model changes

- I don't know, maybe?

Btw are there options to support the development of this module?

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇨🇿Czech Republic Thebys Hradec Králové

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024