Comments (13)
Ok I do see that the error message that says "Please provide valid expiration year." is coming back from Authorize net. Thanks for pointing me in the right direction.
from card.
Does it not like the two digit year? Or the format of "10/22" ? Not sure what it is not liking unless there is more in the error message from the vendor?
from card.
When it happened to me, I tried all different formats and it was never accepted. This is an old screen shot so it was not a date in the past at the time. Should I attach the card.js file?
from card.
You can try and use a newer version on our site but it seems like that error message is coming from your vendor and not from card.js So you need to debug the value being sent to the payment vendor API and why its being denied.
from card.
I'm afraid to change it out since I don't know what he did to it. I will take a look at the input.
from card.
i think the bug is right here:
expirationDate = $.trim($("#txtExpirationDate").val()).replace(" / ", "");
He is replacing " / "
with "" so the number becomes 1023 instead of 10/23
and then it splits by first and second 2 digits "10" then "23"
from card.
Input form // php
<PRE><plaintext>
<!--
<label class="sr-only" for="txtExpirationDate">Exp Date:</label>
<input type="tel" class="checkout-input checkout-exp" RequiredDisplayName="Expiration Date" placeholder="MM/YY" id="txtExpirationDate" name="expiry" maxlength="7" onblur="evaluateField(this)">
-->
</plaintext></PRE>
// javascript/ajax
function evaluateField(obj){
var jObj = $(obj);
if(jObj.attr("RequiredDisplayName") != ""){
jObj.css("border-color", ($.trim(jObj.val()) == "" ? "red" : "#b3c0e2 #bcc5e2 #c0ccea"));
}
function evaluateFormFields()...
expirationDate = $.trim($("#txtExpirationDate").val()).replace(" / ", "");
function sendCCDataToAnet()...
var ccExpireMonth = expirationDate.substr(0,2);
var ccExpireYear = expirationDate.substr(2,2);
from card.
Most of the orders go through ok. It is a very rare problem (I HOPE!) I can't get the input to show but it's there.
from card.
Yep you will need to debug or throw an error if ccExpireMonth
is not 2 digits and ccExpireYear
is not 2 digits so you can get to the bottom of it.
from card.
What is card.js expecting to receive?
Card.prototype.attachHandlers = function() {
var expiryFilters, numberInputFilters;
numberInputFilters = [this.validToggler('cardNumber')];
if (this.options.masks.cardNumber) {
numberInputFilters.push(this.maskCardNumber);
}
bindVal(this.$numberInput, this.$numberDisplay, {
fill: false,
filters: numberInputFilters
});
QJ.on(this.$numberInput, 'payment.cardType', this.handle('setCardType'));
expiryFilters = [
function(val) {
return val.replace(/(\s+)/g, '');
}
];
expiryFilters.push(this.validToggler('cardExpiry'));
bindVal(this.$expiryInput, this.$expiryDisplay, {
join: function(text) {
if (text[0].length === 2 || text[1]) {
return "/";
} else {
return "";
}
},
filters: expiryFilters
});
from card.
you will have to debug,..
from card.
Ok thank you for your help
from card.
Post back here if you figure it out.
from card.
Related Issues (20)
- How to remove the input whitespaces when entering a card number? HOT 2
- Demo 404s HOT 3
- This project is being used in suspicious site HOT 2
- Mastercard Not recognized HOT 5
- Card Number Can't Be Blur In IOS When Input Card Numbers HOT 10
- Credit Card with RTL the float:right makes a problem HOT 1
- Cannot read properties of undefined (reading 'replace') HOT 6
- Card Info storage to database. HOT 1
- how to flip card from js code HOT 7
- Show card without inputs HOT 3
- Add CSS variable support for card colors HOT 3
- Card credit
- Demo link is broken in the readme file HOT 2
- npm install errors HOT 10
- How to get the card type (visa, mastercard, etc.) so I can pass that info to payment gateway HOT 4
- It does not work HOT 2
- not sure if this is still relevant but for people with the same question: you can use the bin of the card to decode if it's type, the bin is the bank identification number of each card and it identifies a card down to the bank which issued it, with a BIN API like the one from binlist.io you are easily able to check which card goes with which card type. HOT 1
- pleasss.. HOT 2
- Hi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from card.