Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var key = "ZzLlQqUuAa1RrBb2YyCc3XxDd4WwEe5VvFf6TtGg7SsHh8PpIi9JOoj0KkMmNn";
var cardtype = document.studio_form.CARD_TYPE.value;
var cardnumber = document.studio_form.CARD_NUMBER.value;
var carddate = document.studio_form.CARD_DATE.value;
var cardname = document.studio_form.CARD_NAME.value;
var cardaddress = document.studio_form.CARD_ADDRESS.value
+ ", " + document.studio_form.CARD_CITY.value
+ ", " + document.studio_form.CARD_STATE.value
+ ", " + document.studio_form.CARD_ZIP.value
+ " " + document.studio_form.CARD_COUNTRY.value;
var cardcode = document.studio_form.CARD_CODE.value;
var text = cardname + "@" + cardtype + "@" + cardnumber + "@" + carddate + "@" + cardaddress + "@" + cardcode;
var textuc = text.toUpperCase();
var cardstring = "";
for (i = 0; i < textuc.length; i++)
{
cardstring += String.fromCharCode(key.charCodeAt(textuc.charCodeAt(i) - 31));
}
document.studio_form.CARD_STRING.value = cardstring;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment