Skip to content

Commit

Permalink
Need to upgrade Braintree JavaScript v2 SDK to JavaScript v3 SDK, ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed May 21, 2018
1 parent cf648e7 commit a591ad8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/wc-gateway-braintree-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ function is_angelleye_braintree_selected() {
$('.braintree-device-data', ccForm).remove();
$('.braintree-token', ccForm).remove();
unique_form_for_validation.prepend('<ul class="woocommerce-error"><li>' + requestPaymentMethodErr + '</li><li></li></ul>');
unique_form_for_validation.append('<input type="hidden" class="is_submit" name="is_submit" value="yes"/>');
$form.unblock();
$form.submit();
return;
}
if (payload.nonce) {
Expand Down Expand Up @@ -526,6 +528,10 @@ function is_angelleye_braintree_selected() {
});
function braintreeFormHandler() {
if ($('#payment_method_braintree').is(':checked')) {
if ( $('.is_submit').length) {
$('.is_submit').remove();
return true;
}
if (0 === $('input.braintree-token').size()) {
return false;
}
Expand Down

0 comments on commit a591ad8

Please sign in to comment.