Skip to content

Commit

Permalink
feat: version 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
artembelfox committed Nov 3, 2023
1 parent 86a56a9 commit 8b57602
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions admin/model/payment/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public function void(int $order_id): array|bool {
$setting = array_replace_recursive((array)$config_setting, (array)$this->config->get('payment_opayo_setting'));

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/void.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/void.vsp';
$void_data['VPSProtocol'] = '4.00';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/void.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/void.vsp';
$void_data['VPSProtocol'] = '4.00';
}

Expand Down Expand Up @@ -136,10 +136,10 @@ public function release(int $order_id, float $amount): array|bool {
$setting = array_replace_recursive((array)$config_setting, (array)$this->config->get('payment_opayo_setting'));

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/release.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/release.vsp';
$release_data['VPSProtocol'] = '4.00';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/release.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/release.vsp';
$release_data['VPSProtocol'] = '4.00';
}

Expand Down Expand Up @@ -179,10 +179,10 @@ public function rebate(int $order_id, float $amount): array|bool {
$setting = array_replace_recursive((array)$config_setting, (array)$this->config->get('payment_opayo_setting'));

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/refund.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/refund.vsp';
$refund_data['VPSProtocol'] = '4.00';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/refund.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/refund.vsp';
$refund_data['VPSProtocol'] = '4.00';
}

Expand Down
12 changes: 6 additions & 6 deletions catalog/controller/payment/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ public function confirm(): void {
$payment_data = [];

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/vspdirect-register.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/vspdirect-register.vsp';
$payment_data['VPSProtocol'] = '4.00';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/vspdirect-register.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/vspdirect-register.vsp';
$payment_data['VPSProtocol'] = '4.00';
}

Expand Down Expand Up @@ -371,9 +371,9 @@ public function threeDSnotify(): void {
$opayo_order_info = $this->model_extension_opayo_payment_opayo->getOrder($this->request->get['order_id']);

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/direct3dcallback.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/direct3dcallback.vsp';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/direct3dcallback.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/direct3dcallback.vsp';
}

$this->request->post['VPSTxId'] = $opayo_order_info['VPSTxId'];
Expand Down Expand Up @@ -468,9 +468,9 @@ public function deleteCard(): void {

if (!empty($card['token'])) {
if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/removetoken.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/removetoken.vsp';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/removetoken.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/removetoken.vsp';
}

$payment_data['VPSProtocol'] = '4.00';
Expand Down
4 changes: 2 additions & 2 deletions catalog/model/payment/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ private function setPaymentData(array $order_info, array $opayo_order_info, floa
$setting = array_replace_recursive((array)$config_setting, (array)$this->config->get('payment_opayo_setting'));

if ($setting['general']['environment'] == 'live') {
$url = 'https://live.sagepay.com/gateway/service/repeat.vsp';
$url = 'https://live.opayo.eu.elavon.com/gateway/service/repeat.vsp';
$payment_data['VPSProtocol'] = '4.00';
} elseif ($setting['general']['environment'] == 'test') {
$url = 'https://test.sagepay.com/gateway/service/repeat.vsp';
$url = 'https://sandbox.opayo.eu.elavon.com/gateway/service/repeat.vsp';
$payment_data['VPSProtocol'] = '4.00';
}

Expand Down
2 changes: 1 addition & 1 deletion install.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Opayo",
"code": "opayo",
"license": "GPL",
"version": "1.0.1",
"version": "1.0.2",
"author": "Dreamvention",
"link": "https://dreamvention.com/"
}

0 comments on commit 8b57602

Please sign in to comment.