Commit 59b346b5 authored by mattwire's avatar mattwire
Browse files

Release 0.9.6 Fix submit credit card memberships on backend for Stripe

parent 8daaaf10
......@@ -9,6 +9,10 @@ Releases use the following numbering system:
* **[BC]**: Items marked with [BC] indicate a breaking change that will require updates to your code if you are using that code in your extension.
## Release 0.9.6
* Fix [Stripe#271](https://lab.civicrm.org/extensions/stripe/-/issues/271) Can't submit credit card memberships: Uncaught (in promise) TypeError: this.form is null
## Release 0.9.5
* Fix [#4](https://lab.civicrm.org/extensions/mjwshared/-/issues/4) Fatal error when is_email_receipt = null.
......
......@@ -14,8 +14,8 @@
<url desc="Release Notes">https://lab.civicrm.org/extensions/mjwshared/-/blob/master/docs/releasenotes.md</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2020-10-21</releaseDate>
<version>0.9.5</version>
<releaseDate>2020-10-24</releaseDate>
<version>0.9.6</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.28</ver>
......
......@@ -170,6 +170,18 @@
return isRecur;
},
/**
* Is the AJAX request a payment form?
* @param {string} url
* @returns {bool}
*/
isAJAXPaymentForm: function(url) {
return (url.match("civicrm(\/|%2F)payment(\/|%2F)form") !== null) ||
(url.match("civicrm(\/|\%2F)contact(\/|\%2F)view(\/|\%2F)participant") !== null) ||
(url.match("civicrm(\/|\%2F)contact(\/|\%2F)view(\/|\%2F)membership") !== null) ||
(url.match("civicrm(\/|\%2F)contact(\/|\%2F)view(\/|\%2F)contribution") !== null);
},
/**
* Output debug information
* @param {string} scriptName
......@@ -208,12 +220,10 @@
// /civicrm/payment/form? occurs when a payproc is selected on page
// /civicrm/contact/view/participant occurs when payproc is first loaded on event credit card payment
// On wordpress these are urlencoded
if ((settings.url.match("civicrm(\/|%2F)payment(\/|%2F)form") !== null) ||
(settings.url.match("civicrm(\/|\%2F)contact(\/|\%2F)view(\/|\%2F)participant") !== null)) {
if (CRM.payment.isAJAXPaymentForm(settings.url)) {
CRM.payment.debugging(CRM.payment.scriptName, 'triggered via ajax');
CRM.payment.form = CRM.payment.getBillingForm();
}
});
}(CRM.$));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment