Files
bobsleighphotos.com/production/modules/altCheckout/PayPal_Pro/button.php
2017-03-02 20:30:40 -06:00

66 lines
1.9 KiB
PHP

<?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&amp;type=altCheckout&amp;cmd=process&amp;module=PayPal_Pro&amp;ccb=".base64_encode($orderSum['prod_total'].",".$config['defaultCurrency']);
} else {
$link = "<a href='index.php?_g=rm&amp;type=altCheckout&amp;cmd=process&amp;module=PayPal_Pro&amp;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;
}
}
?>