removed unnecessary file changes
This commit is contained in:
@@ -353,7 +353,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
// For Advanced Payment work
|
||||
$objAdvPayment = new HotelAdvancedPayment();
|
||||
if ($objAdvPayment->isAdvancePaymentAvailableForCurrentCart()) {
|
||||
if (Tools::isSubmit('submitAdvPayment') && !$this->context->cart->orderExists()) {
|
||||
if (Tools::isSubmit('submitAdvPayment')) {
|
||||
if (Tools::getValue('payment_type') == Order::ORDER_PAYMENT_TYPE_ADVANCE) {
|
||||
$this->context->cart->is_advance_payment = 1;
|
||||
} else {
|
||||
|
||||
@@ -96,11 +96,14 @@ class WkPaypalCommerceWebhook
|
||||
// if order completed then change the status of the order
|
||||
if ($eventData['event_type'] == 'CHECKOUT.ORDER.COMPLETED') {
|
||||
$cartID = $transactionData['id_cart'];
|
||||
$objCart = new Cart($cartID);
|
||||
if ($objCart->is_advance_payment) {
|
||||
$orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED');
|
||||
} else {
|
||||
$orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
|
||||
}
|
||||
if ($orders = WkPaypalCommerceHelper::getOrdersByCartId($cartID)) {
|
||||
foreach ($orders as $order) {
|
||||
$orderStatus = $order['is_advance_payment']
|
||||
? Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED')
|
||||
: Configuration::get('PS_OS_PAYMENT_ACCEPTED');
|
||||
$this->updatePaymentStatus(
|
||||
(int)$orderStatus,
|
||||
$order['id_order']
|
||||
@@ -123,11 +126,14 @@ class WkPaypalCommerceWebhook
|
||||
$transaction_id
|
||||
)) {
|
||||
$cartID = $transactionData['id_cart'];
|
||||
$objCart = new Cart($cartID);
|
||||
if ($objCart->is_advance_payment) {
|
||||
$orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED');
|
||||
} else {
|
||||
$orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
|
||||
}
|
||||
if ($orders = WkPaypalCommerceHelper::getOrdersByCartId($cartID)) {
|
||||
foreach ($orders as $order) {
|
||||
$orderStatus = $order['is_advance_payment']
|
||||
? Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED')
|
||||
: Configuration::get('PS_OS_PAYMENT_ACCEPTED');
|
||||
$this->updatePaymentStatus(
|
||||
(int)$orderStatus,
|
||||
$order['id_order']
|
||||
|
||||
Reference in New Issue
Block a user