// Merge -> 10309
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10333 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -46,8 +46,8 @@ class PaypalPayment extends Paypal
|
||||
|
||||
// Making request
|
||||
$vars = '?fromPayPal=1';
|
||||
$returnURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/payment/submit.php'.$vars;
|
||||
$cancelURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
|
||||
$returnURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/payment/submit.php'.$vars;
|
||||
$cancelURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
|
||||
$paymentAmount = (float)($cart->getOrderTotal());
|
||||
$currencyCodeType = strval($currency->iso_code);
|
||||
$paymentType = Configuration::get('PAYPAL_CAPTURE') == 1 ? 'Authorization' : 'Sale';
|
||||
@@ -68,7 +68,7 @@ class PaypalPayment extends Paypal
|
||||
$country = new Country((int)$address->id_country);
|
||||
if ($address->id_state)
|
||||
$state = new State((int)$address->id_state);
|
||||
$discounts = (float)($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS));
|
||||
$discounts = (float)($cart->getOrderTotal(true, PayPal::ONLY_DISCOUNTS));
|
||||
if ($discounts == 0)
|
||||
{
|
||||
if ($params['cart']->id_customer)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -95,7 +95,7 @@ function displayConfirm()
|
||||
'logo' => $ppPayment->getLogo(),
|
||||
'cust_currency' => Context::getContext()->cart->id_currency,
|
||||
'currency' => $ppPayment->getCurrency((int)Context::getContext()->cart->id_currency),
|
||||
'total' => Context::getContext()->cart->getOrderTotal(true, Cart::BOTH),
|
||||
'total' => Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH),
|
||||
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'. $ppPayment->name.'/',
|
||||
'mode' => 'payment/'
|
||||
));
|
||||
@@ -116,7 +116,7 @@ function submitConfirm()
|
||||
}
|
||||
elseif (!$id_currency = (int)(Tools::getValue('currency_payement')))
|
||||
die('No currency');
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
|
||||
die('Empty cart');
|
||||
$currency = new Currency((int)($id_currency));
|
||||
if (!Validate::isLoadedObject($currency))
|
||||
@@ -133,7 +133,7 @@ function validOrder()
|
||||
header('location:../../../'); exit;
|
||||
die('Not logged');
|
||||
}
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
|
||||
die('Empty cart');
|
||||
if (!$token = Tools::htmlentitiesUTF8(strval(Tools::getValue('token'))))
|
||||
{
|
||||
@@ -153,7 +153,7 @@ function validOrder()
|
||||
|
||||
if (!Context::getContext()->customer->isLogged(true))
|
||||
die('Not logged');
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
|
||||
elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
|
||||
die('Empty cart');
|
||||
|
||||
// No submit, confirmation page
|
||||
|
||||
Reference in New Issue
Block a user