diff --git a/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx b/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx index 9c3ab42fd..d1d15f231 100644 --- a/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx +++ b/app/frontend/src/javascript/components/payment/payzen/payzen-form.tsx @@ -40,7 +40,8 @@ export const PayzenForm: React.FC = ({ 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]); diff --git a/lib/pay_zen/service.rb b/lib/pay_zen/service.rb index 367b71499..35f2fc4a2 100644 --- a/lib/pay_zen/service.rb +++ b/lib/pay_zen/service.rb @@ -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')