Skip to content

Commit 7a47f0e

Browse files
authored
Fix payment form toggle on existing cards. (#13)
1 parent 10cc159 commit 7a47f0e

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

assets/js/nofrixion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ var handleStoredTokens = function () {
419419
// At least one payment token available, if selected hide the CC form.
420420
// If one is selected by default, hide the CC form.
421421
if (jQuery('li.woocommerce-SavedPaymentMethods-token input[type="radio"]:checked').length > 0) {
422-
//togglePaymentForm(true);
422+
togglePaymentForm(true);
423423
}
424424
} else {
425425
// Saved payment methods present but no tokens yet. CC form shown.

src/Gateway/NoFrixionCard.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,33 +66,33 @@ public function payment_fields() {
6666
6767
<div style="width: 100% !important;">
6868
69-
<input style="border: 1px solid lightgray !important;
70-
height: 33px !important;
71-
padding: 8px !important;
72-
margin: 5px 0 5px 0 !important;
73-
width: 40% !important;
74-
background: white !important;
75-
font-size: 16px !important;
76-
box-shadow: none;" type="text" id="nf-expiryMonth" placeholder="MM" size="2" maxlength="2" inputmode="numeric" />
77-
78-
<span style="width: 10% !important;" class="input-group-text">/</span>
79-
80-
<input style="border: 1px solid lightgray !important;
81-
height: 33px !important;
82-
padding: 8px !important;
83-
margin: 5px 0 5px 0 !important;
84-
width: 50% !important;
85-
background: white !important;
86-
font-size: 16px !important;
87-
box-shadow: none;" type="text" id="nf-expiryYear" placeholder="YYYY" size="4" maxlength="4" inputmode="numeric" />
69+
<input style="border: 1px solid lightgray !important;
70+
height: 33px !important;
71+
padding: 8px !important;
72+
margin: 5px 0 5px 0 !important;
73+
width: 40% !important;
74+
background: white !important;
75+
font-size: 16px !important;
76+
box-shadow: none;" type="text" id="nf-expiryMonth" placeholder="MM" size="2" maxlength="2" inputmode="numeric" />
77+
78+
<span style="width: 10% !important;" class="input-group-text">/</span>
79+
80+
<input style="border: 1px solid lightgray !important;
81+
height: 33px !important;
82+
padding: 8px !important;
83+
margin: 5px 0 5px 0 !important;
84+
width: 50% !important;
85+
background: white !important;
86+
font-size: 16px !important;
87+
box-shadow: none;" type="text" id="nf-expiryYear" placeholder="YYYY" size="4" maxlength="4" inputmode="numeric" />
8888
8989
</div>
9090
9191
</div>
9292
9393
<div class="form-row form-row-last">
9494
<label for="nf-cardSecurityCode">Card Code (CVC) <span class="required">*</span></label>
95-
<div id="nf-securityCode-container" class="nf-form-control nf-border-radius" style="height:38px; border-radius: 0.25rem;" />
95+
<div id="nf-securityCode-container" class="nf-form-control nf-border-radius" style="height:38px; border-radius: 0.25rem;"></div>
9696
</div>
9797
</div>
9898
</form>

0 commit comments

Comments
 (0)