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

Created on 10 November 2023, 8 months ago
Updated 8 May 2024, about 2 months 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

Downport

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.69.0 2024