Skip to content

Commit

Permalink
Tech/test hook (#201)
Browse files Browse the repository at this point in the history
* Add pre-commit hook
  • Loading branch information
emilleszczak2 authored Mar 1, 2023
1 parent 7bed093 commit 971f49a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,12 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": false
}
},
"extra": {
"hooks": {
"pre-commit": [
"php vendor/bin/phpcbf"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function process_payment( $order_id ): array {
$payment_data = $this->gateway->payment_request(
$order,
$this->get_return_url( $order ),
isset($payment_method_id) && !empty($payment_method_id) ? intval( $payment_method_id ) : $this->payment_method_id,
isset( $payment_method_id ) && ! empty( $payment_method_id ) ? intval( $payment_method_id ) : $this->payment_method_id,
$authorization_code ?? null
);
add_post_meta( $order_id, '_transaction_id', $payment_data->getPaymentId(), true );
Expand Down

0 comments on commit 971f49a

Please sign in to comment.