- Issue created by @zaporylie
- First commit to issue fork.
- 🇯🇴Jordan mhawwari
Changes:
1. Webhook support:
a. Admins will be presented with the list of supported events for recurring. they can select which events to listen to and submit the form to create the webhook.
b. onNotify support for the following events- recurring.agreement-stopped.v1
- recurring.charge-reserved.v1
- recurring.charge-captured.v1'
- recurring.charge-failed.v1
c. A new event VippsMobilePayEvents::RECURRING_STOPPED to support suspending the subscriptions instead of cancelling them. This allows the module to be compatible with the commerce_recurring suspend patch
2. Replace $matching_payments lookup in onReturn to be based on $charge_reference instead of $agreement_reference.
3. $payment->getRemoteId() in createPayment() is always null for recurring orders. I added the chainReferenceResolver as a fallback.
4. Added the order id as an external id for the agreement and removed unused $plugin variable in RecurringLandingPageRedirectForm.
There's still room for improvement any feedback is welcome.