Initial commit
This commit is contained in:
66
production/modules/altCheckout/PayPal_Pro/button.php
Normal file
66
production/modules/altCheckout/PayPal_Pro/button.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| CubeCart 4
|
||||
| ========================================
|
||||
| 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
|
||||
+--------------------------------------------------------------------------
|
||||
| button.inc.php
|
||||
| ========================================
|
||||
| Button PayPal EC
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
class PayPal_Pro {
|
||||
|
||||
function buildIt($moduleName="", $urlOnly = false) {
|
||||
|
||||
global $subTotal,$config,$orderSum;
|
||||
|
||||
switch(strtolower(LANG_FOLDER)) {
|
||||
case "es":
|
||||
$locale = "es_ES";
|
||||
break;
|
||||
case "fr":
|
||||
$locale = "fr_FR";
|
||||
break;
|
||||
case "nl":
|
||||
$locale = "nl_NL";
|
||||
break;
|
||||
case "de":
|
||||
$locale = "de_DE";
|
||||
break;
|
||||
case "it":
|
||||
$locale = "it_IT";
|
||||
break;
|
||||
default:
|
||||
$locale = "en_US";
|
||||
break;
|
||||
}
|
||||
|
||||
if($urlOnly==true) {
|
||||
$link = "index.php?_g=rm&type=altCheckout&cmd=process&module=PayPal_Pro&ccb=".base64_encode($orderSum['prod_total'].",".$config['defaultCurrency']);
|
||||
} else {
|
||||
|
||||
$link = "<a href='index.php?_g=rm&type=altCheckout&cmd=process&module=PayPal_Pro&ccb=".base64_encode($subTotal.",".$config['defaultCurrency'])."' target='_self' /><img src='https://www.paypal.com/".$locale."/i/btn/btn_xpressCheckout.gif' border='0' title='' alt='' /></a>";
|
||||
|
||||
}
|
||||
|
||||
return $link;
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user