URGENT CODE HELP REQUIRED

icekid85

Avatar: icekid85

2006-08-02 14:41

Hi guys,

I require Two Code's if anyone has them urgently.

I require a code to add to the shopping basket page,
Card Holders Name:
Credit Card Type: (Dropdown Box)
Credit Card Number:
Credit Card Expiry:
Credit Card Start Date:
Credit Card Security Code:

I also need a code to Show how many Item's are in stock,

IF anyone has this code I would be greatfull if you could help me to install this, I have tried just about everything to do this myself and can not get it to work.

Thanks in advance

~icekid85

No avatar

2006-08-15 14:18

No-one able to help?

setekh

No avatar

2006-08-17 14:35

BIG Pointer : GOOGLE

Have you tried to make a simple - " HTML <form> "
Have you tried to write the "$_POST['VALUE']" to some file :

$myFile = "YOUR_FILE";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $POST_['VALUE'];
fwrite($fh, $stringData);
// USE \n for new line
....
fclose($fh);

or just send the data ...

You must also check for CC validity :
// Code by ccval@holotech.net
function CCVal($Num, $Name = 'n/a') {
// Innocent until proven guilty
$GoodCard = true;
// Get rid of any non-digits
$Num = ereg_replace("[^[:digit:]]", "", $Num);
// Perform card-specific checks, if applicable
switch ($Name) {
case "mcd" :
$GoodCard = ereg("^5[1-5].{14}$", $Num);
break;
case "vis" :
$GoodCard = ereg("^4.{15}$|^4.{12}$", $Num);
break;
case "amx" :
$GoodCard = ereg("^3[47].{13}$", $Num);
break;
case "dsc" :
$GoodCard = ereg("^6011.{12}$", $Num);
break;
case "dnc" :
$GoodCard = ereg("^30[0-5].{11}$|^3[68].{12}$", $Num);
break;
case "jcb" :
$GoodCard = ereg("^3.{15}$|^2131|1800.{11}$", $Num);
break;
}
// The Luhn formula works right to left, so reverse the number.
$Num = strrev($Num);
$Total = 0;
for ($x=0; $x<strlen($Num); $x++) {
$digit = substr($Num,$x,1);
// If it's an odd digit, double it
if ($x/2 != floor($x/2)) {
$digit *= 2;
// If the result is two digits, add them
if (strlen($digit) == 2)
$digit = substr($digit,0,1) + substr($digit,1,1);
}
// Add the current digit, doubled and added if applicable, to the Total
$Total += $digit;
}
// If it passed (or bypassed) the card-specific check and the Total is
// evenly divisible by 10, it's cool!
if ($GoodCard && $Total % 10 == 0) return true; else return false;
}

And so on... It would be so much more easy for you to just use PayPal .. it will do all that job for you :) And noone is going to get his card stolen :) hehe either by you or mostly by every script kiddie as i can see by your question... or just use some other Open Source Cart ...

I guess you get the point ...

Back to top
about us | contact