added shipping fee voucher code
This commit is contained in:
@@ -30,7 +30,7 @@ class PaypalController extends Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$paypal_env = "live";
|
||||
$paypal_env = "sandbox";
|
||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||
|
||||
if ($paypal_env == 'live') {
|
||||
@@ -323,7 +323,7 @@ class PaypalController extends Controller
|
||||
);
|
||||
|
||||
$m->updateVoucherValueInCart($data, $item_id);
|
||||
} else {
|
||||
} else if ($voucher[0]->VoucherType == "Percentage") {
|
||||
$data = array(
|
||||
'Price' => round($totalValue * -1, 2)
|
||||
);
|
||||
@@ -333,6 +333,8 @@ class PaypalController extends Controller
|
||||
// 'totalValue' => $totalValue,
|
||||
// 'type' => 'Flat'
|
||||
// );
|
||||
} else if ($voucher[0]->VoucherType == "Shipping") {
|
||||
return $shippingFee = 0;
|
||||
}
|
||||
}
|
||||
// var_dump($item->ShippingCostId);
|
||||
|
||||
Reference in New Issue
Block a user