1<?
if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
die();?><?
2include(dirname(__FILE__).
"/common.php");
19 if (!isset($cardnum) || strlen($cardnum) <= 0)
22 $cardnum = preg_replace(
"/[\D]+/",
"", $cardnum);
23 if (strlen($cardnum) <= 0)
27 if (!isset($cvv2) || strlen($cvv2) <= 0)
30 $cardexp1 = IntVal(
$_REQUEST[
"cardexp1"]);
31 if ($cardexp1 < 1 || $cardexp1 > 12)
32 $strPaySysError .=
"Please enter valid credit card expiration month".
". ";
33 elseif (strlen($cardexp1) < 2)
34 $cardexp1 =
"0".$cardexp1;
36 $cardexp2 = IntVal(
$_REQUEST[
"cardexp2"]);
37 if ($cardexp2 < 5 || $cardexp2 > 50)
38 $strPaySysError .=
"Please enter valid credit card expiration year".
". ";
39 elseif (strlen($cardexp2) < 2)
40 $cardexp2 =
"0".$cardexp2;
43 if (strlen($noc) <= 0)
47 if (strlen($address1) <= 0)
51 if (strlen($zipcode) <= 0)
58 $AMT =
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SHOULD_PAY"];
59 if (
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"] !=
"USD")
65 $additor = $additor / 10;
68 while ($AMT_tmp < $AMT)
74 $AMT = str_replace(
",",
".", $AMT);
75 $cardExp = $cardexp1.$cardexp2;
77 $parms =
"ACCT=".urlencode($cardnum);
78 $parms .=
"&CVV2=".urlencode($cvv2);
79 $parms .=
"&AMT=".urlencode($AMT);
80 $parms .=
"&EXPDATE=".urlencode($cardExp);
82 $parms .=
"&PWD=".urlencode(
$PF_PWD);
83 $parms .=
"&TENDER=C";
84 $parms .=
"&TRXTYPE=S";
85 $parms .=
"&USER=".urlencode(
$PF_USER);
86 $parms .=
"&VENDOR=".urlencode(
$PF_USER);
87 $parms .=
"&ZIP=".urlencode($zipcode);
88 $parms .=
"&STREET=".urlencode($address1);
89 $parms .=
"&COMMENT1=".$ORDER_ID;
90 $parms .=
"&COMMENT2=".urlencode(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"DATE_INSERT"]);
92 $ret_com =
"$strExePath $PF_HOST $PF_PORT \"$parms\" 30";
96 exec($ret_com, $arOutput, $ret_var);
98 $strOutput = $arOutput[0];
103 $arPaySysResult =
array(
104 "PS_STATUS" => ((
$arResult[
"RESULT"] == 0) ?
"Y" :
"N"),
107 "PS_STATUS_MESSAGE" =>
$arResult[
"PNREF"],
109 "PS_CURRENCY" =>
"USD",
110 "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat(
"FULL",
SITE_ID))),
111 "USER_CARD_TYPE" =>
false,
112 "USER_CARD_NUM" => $cardnum,
113 "USER_CARD_EXP_MONTH" => $cardexp1,
114 "USER_CARD_EXP_YEAR" =>
"20".$cardexp2,
115 "USER_CARD_CODE" => $cvv2
123 elseif ($arPaySysRes_tmp[
"RESULT"] == 125)
124 $strPaySysError .=
"Your payment is declined by Fraud Service. Please contact us to make payment".
". ";
126 $strPaySysWarning .=
"Your payment is under review by Fraud Service. We contact you in 48 hours to get more specific information".
". ";
161 <table border=
"0" width=
"100%" cellpadding=
"2" cellspacing=
"2">
163 <td
align=
"right" class=
"tablebody" width=
"40%">
164 <font
class=
"tablebodytext">Credit Card Number</font>
166 <td
class=
"tablebody" width=
"60%">
167 <input
class=
"inputtext" type=
"text" name=
"cardnum" value=
"<?= htmlspecialcharsbx($_REQUEST["cardnum
"]) ?>" size=
"35">
171 <td
align=
"right" class=
"tablebody" width=
"40%">
172 <font
class=
"tablebodytext">CVV2</font>
174 <td
class=
"tablebody" width=
"60%">
175 <input type=
"text" class=
"inputtext" name=
"cvv2" value=
"<?= htmlspecialcharsbx($_REQUEST["cvv2
"]) ?>" size=
"5">
179 <td
align=
"right" class=
"tablebody" width=
"40%">
180 <font
class=
"tablebodytext">Expiration Date&
nbsp;&
nbsp;(MM/YY)</font>
182 <td
class=
"tablebody" width=
"60%">
183 <
select name=
"cardexp1" class=
"inputselect">
184 <option value=
""> </option>
186 for (
$i = 1;
$i <= 12;
$i++)
190 <option value=
"<?= $val ?>" <?
if (
$_REQUEST[
"cardexp1"] ==
$val) echo
"selected";?>><?=
$val ?></option>
195 <
select name=
"cardexp2" class=
"inputselect">
196 <option value=
""> </option>
198 for (
$i = 4;
$i <= 11;
$i++)
202 <option value=
"<?= $val ?>" <?
if (
$_REQUEST[
"cardexp2"] ==
$val) echo
"selected";?>><?=
$val ?></option>
210 <td
align=
"right" class=
"tablebody" width=
"40%">
211 <font
class=
"tablebodytext">Cardholder</font>
213 <td
class=
"tablebody" width=
"60%">
214 <input type=
"text" class=
"inputtext" size=
"40" name=
"noc" value=
"<?= (strlen($_REQUEST["noc
"]) > 0) ? htmlspecialcharsbx($_REQUEST["noc
"]) : $noc_def ?>">
218 <td
align=
"right" class=
"tablebody" width=
"40%">
219 <font
class=
"tablebodytext">Address</font>
221 <td
class=
"tablebody" width=
"60%">
222 <input type=
"text" class=
"inputtext" size=
"40" name=
"address1" value=
"<?= (strlen($_REQUEST["address1
"]) > 0) ? htmlspecialcharsbx($_REQUEST["address1
"]) : $address1_def ?>">
226 <td
align=
"right" class=
"tablebody" width=
"40%">
227 <font
class=
"tablebodytext">Zip</font>
229 <td
class=
"tablebody" width=
"60%">
230 <input type=
"text" class=
"inputtext" size=
"7" name=
"zipcode" value=
"<?= (strlen($_REQUEST["zipcode
"]) > 0) ? htmlspecialcharsbx($_REQUEST["zipcode
"]) : $zipcode_def ?>">
static ConvertCurrency($valSum, $curFrom, $curTo, $valDate="")
static GetParamValue($key, $defaultValue=null)
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
const SALE_VALUE_PRECISION
$GLOBALS['_____370096793']