Skip to content

Commit

Permalink
Update for removed payment ID fallback in formatted payment string (#23
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
rvdsteege committed Jul 3, 2023
1 parent 701b834 commit f4ea7b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/PaymentRequestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ public static function complement( Payment $payment, AbstractPaymentRequest $req
* @link https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_merchantOrderReference
* @link https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/sessions__reqParam_merchantOrderReference
*/
$request->set_merchant_order_reference( $payment->format_string( $config->get_merchant_order_reference() ) );
$merchant_order_reference = $payment->format_string( $config->get_merchant_order_reference() );

if ( '' === $merchant_order_reference ) {
$merchant_order_reference = $payment->get_id();
}

$request->set_merchant_order_reference( $merchant_order_reference );

/**
* Country code.
Expand Down

0 comments on commit f4ea7b2

Please sign in to comment.