Add requires_billing_information Annotation to QuickPay Gateway for Flexible Order Information Collection

Created on 3 July 2025, about 1 month ago

Problem/Motivation

The commerce_quickpay_gateway module provides integration with QuickPay for offsite payment processing in Drupal Commerce. However, it currently lacks a configuration option to allow site administrators to choose whether to collect order information, such as contact details for delivery, locally during the checkout process. Drupal Commerce payment gateways can use the requires_billing_information annotation and the collectsBillingInformation() method to control whether the PaymentInformation checkout pane is used to collect billing information. Without this functionality, the module does not provide flexibility for merchants who want to collect order information on the site to ensure accurate delivery details, instead relying solely on QuickPay’s offsite payment process, which may lead to missing order information.

This enhancement is critical for merchants who need to collect contact details or other billing information locally to support delivery or other order processing requirements. Adding a configuration option to the QuickPay gateway’s admin page allows site administrators to enable or disable the collection of order information, improving the checkout flow and ensuring necessary data is captured on the site.

Proposed resolution

Add the requires_billing_information = FALSE annotation to the @CommercePaymentGateway annotation in the RedirectCheckout plugin (RedirectCheckout.php). This explicitly indicates that the QuickPay gateway does not require billing information by default, allowing QuickPay to handle billing information collection during the offsite payment process if needed. This change:

  • Aligns the module with Drupal Commerce best practices for payment gateways.
  • Ensures that order information, such as contact details for delivery, is not required to be collected locally, respecting QuickPay’s offsite payment flow.
  • Maintains compatibility with the existing QuickPay redirect behavior, as the annotation does not alter the payment flow.
Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇺🇦Ukraine matthew10

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