From dcca0fd7783f73dbe8103ff530a66f42f0e7c174 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" <mjw@mjwconsult.co.uk> Date: Wed, 20 Mar 2019 16:47:25 +0000 Subject: [PATCH] Fix offline (live) event payments for Wordpress --- docs/release/release_notes.md | 9 +++++++++ js/civicrm_stripe.js | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/release/release_notes.md b/docs/release/release_notes.md index b7679fe1..d39acdb4 100644 --- a/docs/release/release_notes.md +++ b/docs/release/release_notes.md @@ -1,3 +1,12 @@ +## Release 5.4 +* Fix drupal webform detection so it doesn't generate a false positive if we also have a webform on the same page. +* Fix Stripe create customer in test mode. +* Fix offline (live) event payments for Wordpress. + +* Add StripeCustomer.updatestripemetadata API. +* Add a system check for invalid API key. +* Add StripeCustomer.delete to delete a customer from CiviCRM. + ## Release 5.3.2 * Fix retrieving email receipt parameter on stripe IPN which stopped contributions from being marked as completed. * Fix webhook check for wordpress so we don't get false positives when everything is configured ok. diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index 0260fedd..3db7b9c3 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -73,8 +73,9 @@ CRM.$(function($) { $( document ).ajaxComplete(function( event, xhr, settings ) { // /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 - if ((settings.url.match("/civicrm/payment/form?")) - || (settings.url.match("/civicrm/contact/view/participant?"))) { + // 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)) { // See if there is a payment processor selector on this form // (e.g. an offline credit card contribution page). if ($('#payment_processor_id').length > 0) { -- GitLab