82 lines
3.0 KiB
PHP
82 lines
3.0 KiB
PHP
<?php
|
|
/*
|
|
+--------------------------------------------------------------------------
|
|
| CubeCart v4.0.0
|
|
| ========================================
|
|
| CubeCart is a registered trade mark of Devellion Limited
|
|
| Copyright Devellion Limited 2006. All rights reserved.
|
|
| Devellion Limited,
|
|
| 5 Bridge Street,
|
|
| Bishops Stortford,
|
|
| HERTFORDSHIRE.
|
|
| CM23 2JU
|
|
| UNITED KINGDOM
|
|
| http://www.devellion.com
|
|
| UK Private Limited Company No. 5323904
|
|
| ========================================
|
|
| Web: http://www.cubecart.com
|
|
| Email: info (at) cubecart (dot) com
|
|
| License Type: CubeCart is NOT Open Source Software and Limitations Apply
|
|
| Licence Info: http://www.cubecart.com/site/faq/license.php
|
|
+--------------------------------------------------------------------------
|
|
| transfer.inc.php
|
|
| ========================================
|
|
| Core functions for the PayPal Gateway
|
|
+--------------------------------------------------------------------------
|
|
*/
|
|
function repeatVars() {
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
function fixedVars() {
|
|
|
|
global $module, $orderSum, $config;
|
|
|
|
$billingName = makeName($orderSum['name']);
|
|
|
|
$hiddenVars = "<input type='hidden' name='cmd' value='_xclick' />
|
|
<input type='hidden' name='business' value='".$module['email']."' />
|
|
<input type='hidden' name='item_name' value='Order #".$orderSum['cart_order_id']."' />
|
|
<input type='hidden' name='item_number' value='".$orderSum['cart_order_id']."' />
|
|
<input type='hidden' name='amount' value='".$orderSum['prod_total']."' />
|
|
<input type='hidden' name='shipping' value='0.00' />
|
|
<input type='hidden' name='invoice' value='".$orderSum['cart_order_id']."' />
|
|
<input type='hidden' name='first_name' value='".$billingName[2]."' />
|
|
<input type='hidden' name='last_name' value='".$billingName[3]."' />
|
|
<input type='hidden' name='currency_code' value='".$config['defaultCurrency']."' />
|
|
<input type='hidden' name='address1' value='".$orderSum['add_1']."' />
|
|
<input type='hidden' name='address2' value='".$orderSum['add_2']."' />
|
|
<input type='hidden' name='city' value='".$orderSum['town']."' />
|
|
<input type='hidden' name='state' value='".$orderSum['county']."' />
|
|
<input type='hidden' name='country' value='".getCountryFormat($orderSum['country'],"id","iso")."' />
|
|
<input type='hidden' name='zip' value='".$orderSum['postcode']."' />
|
|
<input type='hidden' name='day_phone_a' value='".$orderSum['phone']."' />
|
|
<input type='hidden' name='add' value='1' />
|
|
<input type='hidden' name='rm' value='2' />
|
|
<input type='hidden' name='no_note' value='1' />
|
|
<input type='hidden' name='bn' value='CubeCart_Cart_ST'>
|
|
<input type='hidden' name='upload' value='1' />";
|
|
|
|
return $hiddenVars;
|
|
|
|
}
|
|
|
|
///////////////////////////
|
|
// Other Vars
|
|
////////
|
|
if($module['testMode']==1) {
|
|
|
|
$formAction = "https://www.sandbox.paypal.com/cgi-bin/webscr";
|
|
$formMethod = "post";
|
|
$formTarget = "_self";
|
|
|
|
} else {
|
|
|
|
$formAction = "https://www.paypal.com/cgi-bin/webscr";
|
|
$formMethod = "post";
|
|
$formTarget = "_self";
|
|
|
|
}
|
|
?>
|