Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions Metadata/js/omnipay_PaypalRest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@

function renderPaypal() {
paypal.Buttons({


onInit: function(data, actions) {
// Set up the buttons.
if (form.valid()) {
actions.enable()
}
else {
actions.disable();
}

form.on('blur keyup change', 'input', function (event) {
if (form.valid()) {
actions.enable()
}
else {
actions.disable();
}
});
},

createBillingAgreement: function (data, actions) {

var frequencyInterval = $('#frequency_interval').val() || 1;
Expand Down Expand Up @@ -65,7 +86,7 @@
}

var paypalScriptURL = 'https://www.paypal.com/sdk/js?client-id=' + CRM.vars.omnipay.client_id + '&currency=' + CRM.vars.omnipay.currency + '&commit=false&vault=true';
CRM.loadScript(paypalScriptURL, false)
.done(renderPaypal);
CRM.loadScript(paypalScriptURL, false).done(renderPaypal);


})(CRM.$);
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<url desc="Licensing">http://civicrm.org/licensing</url>
</urls>
<releaseDate>2019-07-07</releaseDate>
<version>3.6</version>
<version>3.7</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.13</ver>
<ver>5.17</ver>
</compatibility>
<comments>This module integrates the omnipay library with CiviCRM. This release is for Omnipay 3.x and requires php 7.1. All new development will be here but 2.x series will continue to work.</comments>
<civix>
Expand Down
2 changes: 2 additions & 0 deletions omnipaymultiprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ function omnipaymultiprocessor_civicrm_alterSettingsFolders(&$metaDataFolders) {

function omnipaymultiprocessor_civicrm_preProcess($formName, &$form) {
if ($formName === 'CRM_Contribute_Form_Contribution_Main') {
$form->assign('isJsValidate', TRUE);
CRM_Core_Resources::singleton()->addVars('form', ['suppressAlerts' => 1]);
if (!empty($form->_values['is_recur'])) {
$recurOptions = [
'is_recur_interval' => $form->_values['is_recur_interval'],
Expand Down