Skip to content

Commit 24d8dbc

Browse files
authored
Merge pull request #128 from AltaPay/fix-order-status-issue
Fix: Apple Pay orders are marked as Processing even when the payment fails
2 parents 22c369e + dd92d44 commit 24d8dbc

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [3.8.6]
5+
- Fix: Apple Pay orders are marked as Processing even when the payment fails.
6+
47
## [3.8.5]
58
- Support gateway form independent of the plugin/theme styling.
69

altapay.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* Author URI: https://altapay.com
88
* Text Domain: altapay
99
* Domain Path: /languages
10-
* Version: 3.8.5
10+
* Version: 3.8.6
1111
* Name: SDM_Altapay
1212
* WC requires at least: 3.9.0
13-
* WC tested up to: 10.2.2
13+
* WC tested up to: 10.4.3
1414
*
1515
* @package Altapay
1616
*/
@@ -41,7 +41,7 @@
4141
}
4242

4343
if ( ! defined( 'ALTAPAY_PLUGIN_VERSION' ) ) {
44-
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.5' );
44+
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.6' );
4545
}
4646

4747
// Include the autoloader, so we can dynamically include the rest of the classes.

classes/core/ApplePay.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,10 @@ public function applepay_card_wallet_authorize() {
184184
$txn_id = $transaction['TransactionId'];
185185

186186
$order->add_order_note( __( "Gateway Order ID: $order_id", 'altapay' ) );
187-
$order->add_order_note( __( 'Apple Pay payment completed', 'altapay' ) );
188-
$order->payment_complete();
189-
$order->set_transaction_id( $txn_id );
190-
$order->save();
191-
192187
if ( $response->Result === 'Success' ) {
188+
$order->set_transaction_id( $txn_id );
189+
$order->add_order_note( __( 'Apple Pay payment completed', 'altapay' ) );
190+
$order->payment_complete();
193191

194192
$reconciliation = new Core\AltapayReconciliation();
195193
foreach ( $transaction['ReconciliationIdentifiers'] as $val ) {

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Tags: AltaPay, Gateway, Payments, WooCommerce, Payment Card Industry
44
Requires PHP: 7.4
55
Requires at least: 5.0
66
Tested up to: 6.8.2
7-
Stable tag: 3.8.5
7+
Stable tag: 3.8.6
88
License: MIT
99
WC requires at least: 3.9.0
10-
WC tested up to: 10.2.2
10+
WC tested up to: 10.4.3
1111
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1212

1313
A plugin that integrates your WooCommerce web shop to the AltaPay payments gateway.
@@ -39,6 +39,9 @@ AltaPay's Payment Gateway for WooCommerce provides merchants with access to a fu
3939

4040
== Changelog ==
4141

42+
= 3.8.6 =
43+
* Fix: Apple Pay orders are marked as Processing even when the payment fails.
44+
4245
= 3.8.5 =
4346
* Support gateway form independent of the plugin/theme styling.
4447

wiki.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ The new credentials can now be used as the API Username and API Password in your
316316
## Supported versions
317317

318318
Minimum system requirements are:
319-
- WordPress min. 5.0 – max. 6.8.2
320-
- WooCommerce min. 3.9.0 – max. 10.2.2
319+
- WordPress min. 5.0 – max. 6.9
320+
- WooCommerce min. 3.9.0 – max. 10.4.3
321321
- PHP 7.4 and above
322322
- PHP-bcmath library installed.
323323
- PHP-curl MUST be enabled.
324324

325325
The latest tested version is:
326-
- WordPress 6.8.2, WooCommerce 10.2.2 and PHP 8.4
326+
- WordPress 6.9, WooCommerce 10.4.3 and PHP 8.4
327327

328328

329329
## Troubleshooting

0 commit comments

Comments
 (0)