1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) fix ruby syntax

This commit is contained in:
Du Peng 2023-08-30 18:56:41 +02:00
parent a5c73b64c7
commit 8ec90337b5

View File

@ -86,8 +86,8 @@ class PayZen::Service < Payment::Service
def process_payment_schedule_item(payment_schedule_item)
pz_subscription = payment_schedule_item.payment_schedule.gateway_subscription.retrieve
if pz_subscription['answer']['cancelDate'] && Time.zone.parse(pz_subscription['answer']['cancelDate']) <= Time.current
&& pz_subscription['answer']['pastPaymentsNumber'] != pz_subscription['answer']['totalPaymentsNumber']
if pz_subscription['answer']['cancelDate'] && Time.zone.parse(pz_subscription['answer']['cancelDate']) <= Time.current &&
pz_subscription['answer']['pastPaymentsNumber'] != pz_subscription['answer']['totalPaymentsNumber']
# the subscription was canceled by the gateway => notify & update the status
notify_payment_schedule_gateway_canceled(payment_schedule_item)
payment_schedule_item.update(state: 'gateway_canceled')