Skip to content

Commit

Permalink
Update for removed payment ID fallback in formatted payment string (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Jul 3, 2023
1 parent 8947949 commit c88d738
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,20 @@ public function start( Payment $payment ) {
public function get_output_fields( Payment $payment ) {
$this->client->set_payment_id( (string) $payment->get_id() );
$this->client->set_currency_numeric_code( (string) $payment->get_total_amount()->get_currency()->get_numeric_code() );
$this->client->set_order_id( $payment->format_string( (string) $this->config->order_id ) );
$this->client->set_return_url( home_url( '/' ) );
$this->client->set_notification_url( home_url( '/' ) );
$this->client->set_amount( $payment->get_total_amount() );
$this->client->set_issuer_id( $payment->get_meta( 'issuer' ) );

// Order ID.
$order_id = $payment->format_string( (string) $this->config->order_id );

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

$this->client->set_order_id( $order_id );

// Language.
$customer = $payment->get_customer();

Expand Down

0 comments on commit c88d738

Please sign in to comment.