commerce_jp only sends 3 parameters - currency, amount, and capture to pay.jp, on completion of an order. Because of which pay.jp can never differentiate or identify orders based on the order_id. $transaction_data variable in createPayment method should be as follows:

 $transaction_data = [
      'currency' => $currency_code,
      'amount' => $this->formatNumber($amount->getNumber()),
      'capture' => $capture,
      'metadata' => [
        'invoice_id' => $payment->getOrderId()
      ],
    ];

Comments

KalyaniK created an issue. See original summary.

kalyanik’s picture

Created patch for the same.

kalyanik’s picture

Status: Active » Needs review
kalyanik’s picture

Assigned: kalyanik » Unassigned
kalyanik’s picture

StatusFileSize
new592 bytes