Provide method to generate link for payments / gateways payment remote id

Created on 20 December 2024, 4 months ago

Describe your bug or feature request.

Most of the payment gateways have their dashboard with transaction information. In Drupal Commerce, on the payment tab, we only display the Remote ID as plain text.

It will be useful if we can link that Remote ID to the payment gateway provider dashboard directly.

Proposed solution

  • Add method to the PaymentGatewayInterface named getExternalUrl(PaymentInterface $payment)
  • By default this new method returns null. But each payment gateway can implement it to construct string
  • Add new field formatter for remote_id field, provide option to link remote id with URL if exists

Example of

If a bug, provide steps to reproduce it from a clean install.

πŸ“Œ Task
Status

Active

Version

3.0

Component

Payment

Created by

πŸ‡­πŸ‡·Croatia valic Osijek

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

Merge Requests

Comments & Activities

  • Issue created by @valic
  • πŸ‡­πŸ‡·Croatia valic Osijek

    update example

  • Pipeline finished with Failed
    4 months ago
    Total: 425s
    #374794
  • Pipeline finished with Canceled
    4 months ago
    Total: 224s
    #374803
  • Pipeline finished with Failed
    4 months ago
    Total: 494s
    #374807
  • Pipeline finished with Failed
    4 months ago
    Total: 515s
    #374817
  • πŸ‡­πŸ‡·Croatia valic Osijek
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    @valic, a payment method also has a remote_id, and can have a link to the payment processor.

    Since this method is on the gateway, I would recommend we name the method getExternalPaymentUrl(), so that we can also add getExternalPaymentMethodUrl().

  • Status changed to Needs work about 1 month ago
  • First commit to issue fork.
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 87s
    #440796
  • Pipeline finished with Failed
    about 1 month ago
    Total: 938s
    #440797
  • Pipeline finished with Failed
    about 1 month ago
    Total: 587s
    #441089
Production build 0.71.5 2024