Skip to content
Snippets Groups Projects

Issue #3486554: Payment Gateway duplicated transaction

1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
@@ -147,7 +147,10 @@ class HyperPayCopyAndPayForm extends BasePaymentOffsiteForm implements Container
$request_params['shipping.postcode'] = $shipping_address->getPostalCode();
$request_params['shipping.country'] = $shipping_address->getCountryCode();
}
$request_params['merchantTransactionId'] = $order->id();
$payments = \Drupal::entityTypeManager()
->getStorage('commerce_payment')
->loadByProperties(['order_id' => $order->id()]);
$request_params['merchantTransactionId'] = $order->id() . '-' . count($payments) + 1;
$checkout_id = $hyperpay_gateway->prepareCheckout($request_params);
// Set the checkout ID as (temporary) remote ID. On actual payment, we will
Loading