This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A javascript string extend that makes it easy to parse through | |
text to replace placeholder fields with live data | |
*/ | |
if (String.prototype.parseFields == null) String.prototype.parseFields = function (str, obj) { | |
Object.keys(obj).forEach(function (key) { | |
str = str.split(key).join(obj[key]); | |
}); | |
return str; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Polls the Bluepay reporting API to discover transactions that have been rejected | |
due to insufficient funds or other common reasons. | |
Grabs the output and organizes into an associative 'rejected' array that is easy | |
to parse. From here, you can easily find and update the failed transaction | |
to a 'collection' status. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
************************ | |
************************ | |
quick and dirty example of | |
how check for a completed job | |
using the Bluepay Batch Upload | |
Reporting API and how to convert | |
the CSV results data to an | |
associative array - including all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Quick and dirty jquery snippet to validate password for length, numbers and capital letters. | |
example: this will check password for 8-16 chars, at least one number and at least two capital letters | |
password = _verifyPassword(password, 8, 16, 1, 2); | |
*/ | |
function _verifyPassword(str, lengthMin, lengthMax, intCount, capitalCount) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. strips formatting from inputted phone numbers | |
2. validates it has 10 digits | |
3. creates US formatted phone number (XXX) XXX-XXXX | |
4. returns empty string if invalid. | |
Turns this: 555-123-1233 0r 5551231233 into this: (555) 123-1233 | |
var $formattedPhone = phoneNumberPretty($userInputtedPhone); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. strips formatting from inputted phone numbers | |
2. validates it has 10 digits | |
3. creates US formatted phone number (XXX) XXX-XXXX | |
4. returns empty string if invalid. | |
Turns this: 555-123-1233 0r 5551231233 into this: (555) 123-1233 | |
var formattedPhone = phoneNumberPretty(userInputtedPhone); |