Skip to content

Commit

Permalink
More status prefixes work
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 19, 2024
1 parent 2f82764 commit 7375e23
Show file tree
Hide file tree
Showing 23 changed files with 61 additions and 61 deletions.
18 changes: 9 additions & 9 deletions upload/admin/controller/extension/payment/eway.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,22 @@ public function index(): void {
$data['payment_eway_order_status_id'] = (int)$this->config->get('payment_eway_order_status_id');
}

if (isset($this->request->post['payment_eway_order_status_refunded_id'])) {
$data['payment_eway_order_status_refunded_id'] = (int)$this->request->post['payment_eway_order_status_refunded_id'];
if (isset($this->request->post['payment_eway_refunded_status_id'])) {
$data['payment_eway_refunded_status_id'] = (int)$this->request->post['payment_eway_refunded_status_id'];
} else {
$data['payment_eway_order_status_refunded_id'] = (int)$this->config->get('payment_eway_order_status_refunded_id');
$data['payment_eway_refunded_status_id'] = (int)$this->config->get('payment_eway_refunded_status_id');
}

if (isset($this->request->post['payment_eway_order_status_auth_id'])) {
$data['payment_eway_order_status_auth_id'] = (int)$this->request->post['payment_eway_order_status_auth_id'];
if (isset($this->request->post['payment_eway_auth_status_id'])) {
$data['payment_eway_auth_status_id'] = (int)$this->request->post['payment_eway_auth_status_id'];
} else {
$data['payment_eway_order_status_auth_id'] = (int)$this->config->get('payment_eway_order_status_auth_id');
$data['payment_eway_auth_status_id'] = (int)$this->config->get('payment_eway_auth_status_id');
}

if (isset($this->request->post['payment_eway_order_status_fraud_id'])) {
$data['payment_eway_order_status_fraud_id'] = (int)$this->request->post['payment_eway_order_status_fraud_id'];
if (isset($this->request->post['payment_eway_fraud_status_id'])) {
$data['payment_eway_fraud_status_id'] = (int)$this->request->post['payment_eway_fraud_status_id'];
} else {
$data['payment_eway_order_status_fraud_id'] = (int)$this->config->get('payment_eway_order_status_fraud_id');
$data['payment_eway_fraud_status_id'] = (int)$this->config->get('payment_eway_fraud_status_id');
}

if (isset($this->request->post['payment_eway_transaction_method'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ public function index(): void {
$data['payment_firstdata_remote_order_status_success_unsettled_status_id'] = (int)$this->config->get('payment_firstdata_remote_order_status_success_unsettled_status_id');
}

if (isset($this->request->post['payment_firstdata_remote_order_status_decline_id'])) {
$data['payment_firstdata_remote_order_status_decline_id'] = (int)$this->request->post['payment_firstdata_remote_order_status_decline_id'];
if (isset($this->request->post['payment_firstdata_remote_declined_status_id'])) {
$data['payment_firstdata_remote_declined_status_id'] = (int)$this->request->post['payment_firstdata_remote_declined_status_id'];
} else {
$data['payment_firstdata_remote_order_status_decline_id'] = (int)$this->config->get('payment_firstdata_remote_order_status_decline_id');
$data['payment_firstdata_remote_declined_status_id'] = (int)$this->config->get('payment_firstdata_remote_declined_status_id');
}

if (isset($this->request->post['payment_firstdata_remote_card_storage'])) {
Expand Down
6 changes: 3 additions & 3 deletions upload/admin/controller/extension/payment/globalpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ public function index(): void {
$data['payment_globalpay_success_unsettled_status_id'] = (int)$this->config->get('payment_globalpay_success_unsettled_status_id');
}

if (isset($this->request->post['payment_globalpay_order_status_decline_id'])) {
$data['payment_globalpay_decline_id'] = (int)$this->request->post['payment_globalpay_order_status_decline_id'];
if (isset($this->request->post['payment_globalpay_declined_status_id'])) {
$data['payment_globalpay_decline_id'] = (int)$this->request->post['payment_globalpay_declined_status_id'];
} else {
$data['payment_globalpay_decline_id'] = (int)$this->config->get('payment_globalpay_order_status_decline_id');
$data['payment_globalpay_decline_id'] = (int)$this->config->get('payment_globalpay_declined_status_id');
}

if (isset($this->request->post['payment_globalpay_decline_pending_id'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ public function index(): void {
$data['payment_globalpay_remote_success_unsettled_status_id'] = (int)$this->config->get('payment_globalpay_remote_success_unsettled_status_id');
}

if (isset($this->request->post['payment_globalpay_remote_order_status_decline_id'])) {
$data['payment_globalpay_remote_decline_id'] = (int)$this->request->post['payment_globalpay_remote_order_status_decline_id'];
if (isset($this->request->post['payment_globalpay_remote_declined_status_id'])) {
$data['payment_globalpay_remote_decline_id'] = (int)$this->request->post['payment_globalpay_remote_declined_status_id'];
} else {
$data['payment_globalpay_remote_decline_id'] = (int)$this->config->get('payment_globalpay_remote_order_status_decline_id');
$data['payment_globalpay_remote_decline_id'] = (int)$this->config->get('payment_globalpay_remote_declined_status_id');
}

if (isset($this->request->post['payment_globalpay_remote_decline_pending_id'])) {
Expand Down
6 changes: 3 additions & 3 deletions upload/admin/controller/extension/payment/realex.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ public function index(): void {
$data['payment_realex_success_unsettled_status_id'] = (int)$this->config->get('payment_realex_success_unsettled_status_id');
}

if (isset($this->request->post['payment_realex_order_status_decline_id'])) {
$data['payment_realex_decline_id'] = (int)$this->request->post['payment_realex_order_status_decline_id'];
if (isset($this->request->post['payment_realex_declined_status_id'])) {
$data['payment_realex_decline_id'] = (int)$this->request->post['payment_realex_declined_status_id'];
} else {
$data['payment_realex_decline_id'] = (int)$this->config->get('payment_realex_order_status_decline_id');
$data['payment_realex_decline_id'] = (int)$this->config->get('payment_realex_declined_status_id');
}

if (isset($this->request->post['payment_realex_decline_pending_id'])) {
Expand Down
6 changes: 3 additions & 3 deletions upload/admin/controller/extension/payment/realex_remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ public function index(): void {
$data['payment_realex_remote_success_unsettled_status_id'] = (int)$this->config->get('payment_realex_remote_success_unsettled_status_id');
}

if (isset($this->request->post['payment_realex_remote_order_status_decline_id'])) {
$data['payment_realex_remote_decline_id'] = (int)$this->request->post['payment_realex_remote_order_status_decline_id'];
if (isset($this->request->post['payment_realex_remote_declined_status_id'])) {
$data['payment_realex_remote_decline_id'] = (int)$this->request->post['payment_realex_remote_declined_status_id'];
} else {
$data['payment_realex_remote_decline_id'] = (int)$this->config->get('payment_realex_remote_order_status_decline_id');
$data['payment_realex_remote_decline_id'] = (int)$this->config->get('payment_realex_remote_declined_status_id');
}

if (isset($this->request->post['payment_realex_remote_decline_pending_id'])) {
Expand Down
8 changes: 4 additions & 4 deletions upload/admin/view/template/extension/payment/cardconnect.twig
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@
</div>
<div class="tab-pane" id="tab-order-status">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cardconnect-order-status-pending"><span data-toggle="tooltip" title="{{ help_order_status_pending|escape('html') }}">{{ entry_order_status_pending }}</span></label>
<label class="col-sm-2 control-label" for="input-cardconnect-status-pending"><span data-toggle="tooltip" title="{{ help_order_status_pending|escape('html') }}">{{ entry_order_status_pending }}</span></label>
<div class="col-sm-10">
<select name="payment_cardconnect_pending_status_id" class="form-control" id="input-cardconnect-order-status-pending"/>
<select name="payment_cardconnect_pending_status_id" class="form-control" id="input-cardconnect-status-pending"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_cardconnect_pending_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
Expand All @@ -227,9 +227,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cardconnect-order-status-processing"><span data-toggle="tooltip" title="{{ help_order_status_processing|escape('html') }}">{{ entry_order_status_processing }}</span></label>
<label class="col-sm-2 control-label" for="input-cardconnect-status-processing"><span data-toggle="tooltip" title="{{ help_order_status_processing|escape('html') }}">{{ entry_order_status_processing }}</span></label>
<div class="col-sm-10">
<select name="payment_cardconnect_processing_status_id" class="form-control" id="input-cardconnect-order-status-processing"/>
<select name="payment_cardconnect_processing_status_id" class="form-control" id="input-cardconnect-status-processing"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_cardconnect_processing_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
Expand Down
14 changes: 7 additions & 7 deletions upload/admin/view/template/extension/payment/eway.twig
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-refund">{{ entry_order_status_refund }}</label>
<label class="col-sm-2 control-label" for="input-status-refund">{{ entry_order_status_refund }}</label>
<div class="col-sm-10">
<select name="payment_eway_order_status_refunded_id" class="form-control" id="input-order-status-refund"/>
<select name="payment_eway_refunded_status_id" class="form-control" id="input-status-refund"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_eway_order_status_refunded_id %}
{% if order_status.order_status_id == payment_eway_refunded_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand All @@ -187,9 +187,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-auth">{{ entry_order_status_auth }}</label>
<div class="col-sm-10">
<select name="payment_eway_order_status_auth_id" class="form-control" id="input-order-status-auth"/>
<select name="payment_eway_auth_status_id" class="form-control" id="input-order-status-auth"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_eway_order_status_auth_id %}
{% if order_status.order_status_id == payment_eway_auth_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand All @@ -201,9 +201,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-fraud">{{ entry_order_status_fraud }}</label>
<div class="col-sm-10">
<select name="payment_eway_order_status_fraud_id" class="form-control" id="input-order-status-fraud"/>
<select name="payment_eway_fraud_status_id" class="form-control" id="input-order-status-fraud"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_eway_order_status_fraud_id %}
{% if order_status.order_status_id == payment_eway_fraud_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/extension/payment/firstdata.twig
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_firstdata_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_firstdata_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_firstdata_order_status_decline_id %}
{% if order_status.order_status_id == payment_firstdata_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_firstdata_remote_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_firstdata_remote_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_firstdata_remote_order_status_decline_id %}
{% if order_status.order_status_id == payment_firstdata_remote_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/extension/payment/globalpay.twig
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_globalpay_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_globalpay_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_globalpay_order_status_decline_id %}
{% if order_status.order_status_id == payment_globalpay_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_globalpay_remote_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_globalpay_remote_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_globalpay_remote_order_status_decline_id %}
{% if order_status.order_status_id == payment_globalpay_remote_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/extension/payment/realex.twig
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_realex_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_realex_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_realex_order_status_decline_id %}
{% if order_status.order_status_id == payment_realex_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@
<div class="form-group">
<label class="col-sm-2 control-label" for="input-order-status-decline">{{ entry_status_decline }}</label>
<div class="col-sm-10">
<select name="payment_realex_remote_order_status_decline_id" class="form-control" id="input-order-status-decline"/>
<select name="payment_realex_remote_declined_status_id" class="form-control" id="input-order-status-decline"/>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == payment_realex_remote_order_status_decline_id %}
{% if order_status.order_status_id == payment_realex_remote_declined_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/extension/payment/eway.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ public function callback(): void {
$message .= 'Card Response Code: ' . $response_code . "\n";

if ($fraud) {
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_eway_order_status_fraud_id'), $message);
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_eway_fraud_status_id'), $message);
} elseif ($this->config->get('payment_eway_transaction_method') == 'payment') {
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_eway_order_status_id'), $message);
} else {
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_eway_order_status_auth_id'), $message);
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_eway_auth_status_id'), $message);
}

$token_customer_id = (string)$result->Customer->TokenCustomerID;
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/extension/payment/firstdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function notify(): void {
$message = $this->request->post['fail_reason'] . '<br/>';
$message .= $this->language->get('text_response_code_full') . $this->request->post['approval_code'];

$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_firstdata_order_status_decline_id'), $message);
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_firstdata_declined_status_id'), $message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function send(): void {
$message .= $this->language->get('text_card_brand') . $capture_result['brand'] . '<br/>';
$message .= $this->language->get('text_card_number_ref') . $capture_result['card_number_ref'] . '<br/>';

$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_firstdata_remote_order_status_decline_id'), $message);
$this->model_checkout_order->addHistory($order_id, $this->config->get('payment_firstdata_remote_declined_status_id'), $message);
}
}

Expand Down
Loading

0 comments on commit 7375e23

Please sign in to comment.