1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix using payzen with scheduled subscriptions

This commit is contained in:
Sylvain 2021-10-18 16:34:53 +02:00
parent 1a672b0644
commit 4b41b29b9d
2 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,8 @@ export const PayzenForm: React.FC<PayzenFormProps> = ({ onSubmit, onSuccess, onE
.then(({ KR, result }) => KR.showForm(result.formId))
.then(({ KR }) => KR.onFormReady(handleFormReady))
.then(({ KR }) => KR.onFormCreated(handleFormCreated))
.then(({ KR }) => { PayZenKR.current = KR; });
.then(({ KR }) => { PayZenKR.current = KR; })
.catch(error => onError(error));
}).catch(error => onError(error));
});
}, [cart, paymentSchedule, customer]);

View File

@ -10,7 +10,7 @@ module PayZen; end
## create remote objects on PayZen
class PayZen::Service < Payment::Service
def create_subscription(payment_schedule, order_id)
def create_subscription(payment_schedule, order_id, *args)
first_item = payment_schedule.ordered_items.first
order = PayZen::Order.new.get(order_id, operation_type: 'VERIFICATION')