Fields "firstname" and "lastname" are hard-coded

Created on 10 November 2023, about 1 year ago

Problem/Motivation

The error: "InvalidArgumentException: Field firstname is unknown." is throw on payment checkout pane.

First name and last name are hard-coded on line 655/656 of the Paybox.php class.

    $pbs_billing = $xmlEncoder->encode([
      'Address' => [
        'FirstName' => $user->get('firstname')->getString(),
        'LastName' => $user->get('lastname')->getString(),
         ...
      ],
    ]

Steps to reproduce

  • Create a new Drupal commerce
  • Configure checkout with this Paybox payment
  • Go to checkout and click on pay button.

Proposed resolution

Add parameters to the payment configuration form to manage the fields to be used.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France damien laguerre

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024