public function Handle_GetPaymentMethod($order) { $method = array(); $method['Title'] = 'PayPal'; $method['Description'] = 'Pay with your PayPal account'; $method['ThumbnailUrl'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/paypal/icon.png'; // config the handling module in the mobile engine $method['Module'] = 'WebPaymentActivity'; $params = array(); // new paypal module (3.4.5) if (defined('WPS') && defined('HSS') && defined('ECS')) { $paypal_method = (int) Configuration::get('PAYPAL_PAYMENT_METHOD'); if ($paypal_method == WPS || $paypal_method == ECS) { $cancel_url = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/paypal/express_checkout/cancel.php'; $params['Url'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/paypal/express_checkout/payment.php?express_checkout=payment_cart¤t_shop_url=' . urlencode($cancel_url) . '&'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl(); $params['CancelTrigger'] = $cancel_url; } } // old paypal module (2.8.6) if (defined('_PAYPAL_INTEGRAL_EVOLUTION_') && defined('_PAYPAL_INTEGRAL_EVOLUTION_') && defined('_PAYPAL_INTEGRAL_EVOLUTION_')) { if (Configuration::get('PAYPAL_PAYMENT_METHOD') == _PAYPAL_INTEGRAL_EVOLUTION_) { // integral_evolution/paypal.tpl $params['Url'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/paypal/integral_evolution/redirect.php'; $params['CompleteTrigger'] = PayPal::getShopDomain(true, true) . __PS_BASE_URI__ . 'order-confirmation.php'; $params['CancelTrigger'] = PayPal::getShopDomain(true, true) . __PS_BASE_URI__; } elseif (Configuration::get('PAYPAL_PAYMENT_METHOD') == _PAYPAL_INTEGRAL_ or Configuration::get('PAYPAL_PAYMENT_METHOD') == _PAYPAL_OPTION_PLUS_) { if ($this->_isPayPalAPIAvailable()) { // payment/payment.tpl $params['Url'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/paypal/payment/submit.php'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'order-confirmation.php'; $params['CancelTrigger'] = PayPal::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'order'; // either order.php or order-opc.php $params['RedirectTrigger'] = array('Trigger' => CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/paypal/payment/submit.php', 'Redirect' => CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/paypal/payment/error.php'); } else { // standard/paypal.tpl $params['Url'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/paypal/standard/redirect.php'; $params['CompleteTrigger'] = PayPal::getShopDomain(true, true) . __PS_BASE_URI__ . 'order-confirmation.php'; $params['CancelTrigger'] = PayPal::getShopDomain(true, true) . __PS_BASE_URI__; } } } // very old paypal (2.0 and below) if (empty($params)) { $params['Url'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/paypal/old/hookpayment.php'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'order-confirmation.php'; $params['CancelTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl(); } $method['ModuleParameters'] = $params; return $method; }
public function Handle_GetPaymentMethod($order) { $method = array(); $method['Title'] = 'Servired'; $method['Description'] = 'Pay with your credit card'; $method['ThumbnailUrl'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/servired/icon.png'; // config the handling module in the mobile engine $method['Module'] = 'WebPaymentActivity'; $params = array(); $params['Url'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/servired/hookpayment.php'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl(); $method['ModuleParameters'] = $params; return $method; }
public function hijackPage() { if (CartAPI_Handlers_Helpers::isAppixiaMobileEngine()) { // allow to disable hijacking by addinging a url parameter (appixiaignore=1&) if (isset($_REQUEST['appixiaignore']) && $_REQUEST['appixiaignore']) { return; } // perform the hijack $url = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']; $redirectTo = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/appixiacartapi/pagehook.php?q=' . urlencode($url); header('Location: ' . $redirectTo); exit; } }
public function Handle_GetPaymentMethod($order) { $method = array(); $method['Title'] = 'Pago con tarjeta'; $method['Description'] = 'Conexion segura con Pasat 4B'; $method['ThumbnailUrl'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/cuatrob/icon.png'; // config the handling module in the mobile engine $method['Module'] = 'WebPaymentActivity'; $params = array(); $params['Url'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/cuatrob/submit.php'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/cuatrob/resultado.php'; $method['ModuleParameters'] = $params; return $method; }
public function Handle_GetPaymentMethod($order) { $method = array(); $method['Title'] = 'BankWire'; $method['Description'] = 'Pay with a bank wire transfer'; $method['ThumbnailUrl'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/bankwire/icon.png'; // config the handling module in the mobile engine $method['Module'] = 'WebPaymentActivity'; $params = array(); $params['Url'] = $params['Url'] = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/bankwire/validation.php'; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'order-confirmation.php'; $params['CancelTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl() . 'order.php'; $method['ModuleParameters'] = $params; return $method; }
public static function updateShippingMethodDictionary(&$method) { global $cart; // this module is the return url to add the kiala order (with the point) after selection $returnUrl = CartAPI_Handlers_Helpers::getCartApiHomeUrl() . 'modules/kiala/return.php?'; $address = new Address($cart->id_address_delivery); $kiala_request = new KialaRequest(); $url = $kiala_request->getSearchRequest($address, $cart->id_lang, $returnUrl); $method['Module'] = 'WebShippingActivity'; $params = array(); $params['Url'] = $url; $params['CompleteTrigger'] = CartAPI_Handlers_Helpers::getShopBaseUrl(); // return.php redirects there after finishing $method['ModuleParameters'] = $params; }
public static function getCartApiHomeUrl() { return CartAPI_Handlers_Helpers::getShopBaseUrl() . 'modules/appixiacartapi/'; }