Skip to content

Commit d215cbd

Browse files
committed
Upgrade version (HPOS/separated payment methods)
1 parent 0fa68a2 commit d215cbd

8 files changed

+719
-393
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release Notes
22

3+
## v2.0.5 (2024-07-24)
4+
### Fixed
5+
- Upgraded version to support most recent WooCommerce functionalities (HPOS)
6+
- Upgraded additional payment methods (logical/physically separated)
7+
38
## v2.0.4 (2023-10-24)
49
### Fixed
510
- Display of capture, void, refund buttons

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
- Contributors: AllSecure Exchange
55
- Tags: Credit Card, e-commerce, payment, checkout
66
- Requires at least: 4.0
7-
- Tested up to: 6.2.1
7+
- Tested up to: 6.6
88
- Requires PHP: 5.5
9-
- Stable tag: 2.0.4
9+
- Stable tag: 2.0.5
1010
- WC requires at least: 2.4
11-
- WC tested up to: 7.5.1
11+
- WC tested up to: 8.8.5
1212

1313
Accept payments in your WooCommerce store using AllSecure **EXCHANGE** Platform. See a fully functional WooCommerce <a href="http://demo.allsecure.xyz/cart/exchange/woo" target="_new">demo store</a> with AllSecure **EXCHANGE** as a payment gateway.
1414

@@ -17,12 +17,14 @@ Accept payments in your WooCommerce store using AllSecure **EXCHANGE** Platform.
1717
- Activate the plugin through the 'Plugins' screen in WordPress
1818

1919
**Configuration**
20-
21-
1. Go to `WooCommerce` > `Settings` > `Payments` in your shop's admin area.
22-
2. Click on `Set up` on a `AllSecure Exchange` payment method.
20+
1. Go to `Pages` > `Checkout` > `Edit` in your shop's admin area.
21+
- a. Click on `Block`
22+
- b. Click on Switch to classic checkout
23+
2. Go to `WooCommerce` > `Settings` > `Payments` in your shop's admin area.
24+
3. Click on `Set up` on a `AllSecure Exchange` payment method.
2325
- a. Enter your API and payment method credentials.
2426
- b. Click on `Save changes`.
2527
- c. Go back to `Payments` overview.
26-
3. Enable configured `AllSecure Exchange` payment methods.
28+
4. Enable configured `AllSecure Exchange` payment methods.
2729

2830
The active payment methods will be provided to your customers during checkout.

allsecureexchange/allsecure-exchange-additional-payment-method-abstract.php

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public function __construct() {
4949

5050
$settings = get_option('woocommerce_allsecureexchange_settings');
5151

52-
$this->operation_mode = $settings['operation_mode'];
53-
$this->api_user = $settings['api_user'];
54-
$this->api_password = $settings['api_password'];
55-
$this->payment_action = $settings['payment_action'];
56-
$this->transaction_email = $settings['transaction_email'];
57-
$this->transaction_confirmation_page = $settings['transaction_confirmation_page'];
58-
$this->debug = $settings['debug'];
52+
$this->operation_mode = $this->get_option('operation_mode');
53+
$this->api_user = $this->get_option('api_user');
54+
$this->api_password = $this->get_option('api_password');
55+
$this->payment_action = $this->get_option('payment_action');
56+
$this->transaction_email = $this->get_option('transaction_email');
57+
$this->transaction_confirmation_page = $this->get_option('transaction_confirmation_page');
58+
$this->debug = $this->get_option('debug');
5959

6060
// Load the settings.
6161
$this->init_form_fields();
@@ -96,6 +96,29 @@ public function init_form_fields() {
9696
'default' => '',
9797
'desc_tip' => false,
9898
),
99+
'operation_mode' => array(
100+
'title' => __('Operation Mode', $this->domain),
101+
'type' => 'select',
102+
'label' => __('Operation Mode', $this->domain),
103+
'options' => array('live' => __('Live', $this->domain), 'test' => __('Test', $this->domain)),
104+
'default' => 'test',
105+
),
106+
'api_credentials' => array(
107+
'title' => __('API Credentials', $this->domain),
108+
'type' => 'title',
109+
),
110+
'api_user' => array(
111+
'title' => __('API User', $this->domain),
112+
'type' => 'text',
113+
'description' => __('Please enter your Exchange API User. This is needed in order to take the payment.', $this->domain),
114+
'default' => '',
115+
),
116+
'api_password' => array(
117+
'title' => __('API Password', $this->domain),
118+
'type' => 'text',
119+
'description' => __('Please enter your Exchange API Password. This is needed in order to take the payment.', $this->domain),
120+
'default' => '',
121+
),
99122
'api_key' => array(
100123
'title' => __('API Key', $this->domain),
101124
'type' => 'text',
@@ -108,6 +131,40 @@ public function init_form_fields() {
108131
'description' => __('Please enter your Exchange API Shared Secret. This is needed in order to take the payment.', $this->domain),
109132
'default' => '',
110133
),
134+
'payment_details' => array(
135+
'title' => __('Payment Details', 'allsecureexchange' ),
136+
'type' => 'title',
137+
),
138+
'payment_action' => array(
139+
'title' => __('Transaction Type', $this->domain),
140+
'type' => 'select',
141+
'label' => __('Transaction Type', $this->domain),
142+
'options' => array('debit' => __('Debit', $this->domain), 'preauthorize' => __('Preauthorize', $this->domain)),
143+
'default' => 'debit',
144+
'description' => __('<strong>Debit: </strong>Debits the end customer with the given amount.<br/>
145+
<strong>Preauthorize: </strong>Reserves the payment amount on the customer\'s payment instrument.
146+
Preauthorization must be captured afterwards to conclude the transaction.', $this->domain),
147+
),
148+
'transaction_email' => array(
149+
'title' => __('Transaction Details', $this->domain),
150+
'type' => 'checkbox',
151+
'label' => __('Enable transaction details in the confirmation email', $this->domain),
152+
'default' => 'no',
153+
'description'=> __( 'When enabled, plugin will add transaction details in the order confirmation email.', $this->domain),
154+
),
155+
'transaction_confirmation_page' => array(
156+
'title' => __('', $this->domain),
157+
'type' => 'checkbox',
158+
'label' => __('Enable transaction details in the confirmation page', $this->domain),
159+
'default' => 'no',
160+
'description'=> __( 'When enabled, plugin will add transaction details in the order confirmation page.', $this->domain),
161+
),
162+
'debug' => array(
163+
'title' => __('Debug', $this->domain),
164+
'type' => 'checkbox',
165+
'label' => __(' ', $this->domain),
166+
'default' => 'no'
167+
),
111168
);
112169

113170
$this->form_fields = $field_arr;
@@ -161,6 +218,7 @@ function payment_fields() {
161218

162219
<?php
163220
}
221+
164222

165223
/**
166224
* Process the payment and return the result.
@@ -171,7 +229,7 @@ function payment_fields() {
171229
public function process_payment($order_id) {
172230
global $woocommerce;
173231

174-
$order = wc_get_order($order_id);
232+
$order = $this->allsecureMain->getOrder($order_id);
175233

176234
try {
177235
$transaction_token = '';
Binary file not shown.

allsecureexchange/languages/allsecureexchange-en_GB.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: \n"
44
"POT-Creation-Date: 2023-06-16 11:41+0200\n"
5-
"PO-Revision-Date: 2023-06-29 14:55+0200\n"
5+
"PO-Revision-Date: 2024-07-23 10:39+0200\n"
66
"Last-Translator: \n"
77
"Language-Team: \n"
88
"Language: en_GB\n"
@@ -51,7 +51,7 @@ msgstr ""
5151

5252
#: woocommerce-allsecure-exchange.php:148
5353
msgid "Credit Card"
54-
msgstr ""
54+
msgstr "Payment Card"
5555

5656
#: woocommerce-allsecure-exchange.php:152
5757
msgid "Description"
@@ -396,7 +396,7 @@ msgstr ""
396396

397397
#: woocommerce-allsecure-exchange.php:806
398398
msgid "Credit Card Information"
399-
msgstr ""
399+
msgstr "Payment Card Information"
400400

401401
#: woocommerce-allsecure-exchange.php:808
402402
msgid "Card holder"
Binary file not shown.

0 commit comments

Comments
 (0)