mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
Fix a bug: With PayZen, when there was more than one transaction (for ex: 1 failed atempt + 1 successful atemp), the order was not considered PAID because only the first transaction was checked (https://app.clickup.com/t/28zvhwy)
This commit is contained in:
parent
6996cd5e0a
commit
4b30d9f124
@ -1,5 +1,9 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## next deploy
|
||||
|
||||
- Fix a bug: With PayZen, when there was more than one transaction (for ex: 1 failed atempt + 1 successful atemp), the order was not considered PAID because only the first transaction was checked (https://app.clickup.com/t/28zvhwy)
|
||||
|
||||
## v5.3.12 2022 April 20
|
||||
|
||||
- Auto sync projects to OpenLab if set openlab_app_id and openlab_app_secret
|
||||
|
@ -65,7 +65,7 @@ class API::PayzenController < API::PaymentsController
|
||||
|
||||
cart = shopping_cart
|
||||
|
||||
if order['answer']['transactions'].first['status'] == 'PAID'
|
||||
if order['answer']['transactions'].any? { |transaction| transaction['status'] == 'PAID' }
|
||||
render on_payment_success(params[:order_id], cart)
|
||||
else
|
||||
render json: order['answer'], status: :unprocessable_entity
|
||||
|
Loading…
x
Reference in New Issue
Block a user