Skip to content
This repository was archived by the owner on Jan 10, 2022. It is now read-only.

Commit 37858ae

Browse files
committed
Move class Core\Statuses to Payments\PaymentStatus.
1 parent e3c68d6 commit 37858ae

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/Extension.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Pronamic\WordPress\Pay\Extensions\WPeCommerce;
1212

13-
use Pronamic\WordPress\Pay\Core\Statuses;
13+
use Pronamic\WordPress\Pay\Payments\PaymentStatus;
1414
use Pronamic\WordPress\Pay\Extensions\WPeCommerce\Gateways\Gateway;
1515
use Pronamic\WordPress\Pay\Payments\Payment;
1616
use Pronamic\WordPress\Pay\Plugin;
@@ -187,16 +187,16 @@ public static function status_update( Payment $payment, $can_redirect = false )
187187
$merchant = new Gateway( $payment->get_source_id() );
188188

189189
switch ( $payment->status ) {
190-
case Statuses::CANCELLED:
190+
case PaymentStatus::CANCELLED:
191191
$merchant->set_purchase_processed_by_purchid( WPeCommerce::PURCHASE_STATUS_INCOMPLETE_SALE );
192192

193193
break;
194194

195-
case Statuses::EXPIRED:
196-
case Statuses::FAILURE:
195+
case PaymentStatus::EXPIRED:
196+
case PaymentStatus::FAILURE:
197197
break;
198198

199-
case Statuses::SUCCESS:
199+
case PaymentStatus::SUCCESS:
200200
/*
201201
* Transactions results
202202
*
@@ -210,7 +210,7 @@ public static function status_update( Payment $payment, $can_redirect = false )
210210

211211
break;
212212

213-
case Statuses::OPEN:
213+
case PaymentStatus::OPEN:
214214
default:
215215
break;
216216
}
@@ -232,7 +232,7 @@ public static function redirect_url( $url, Payment $payment ) {
232232
);
233233

234234
switch ( $payment->status ) {
235-
case Statuses::CANCELLED:
235+
case PaymentStatus::CANCELLED:
236236
/*
237237
* Remove 'sessionid' paramater from the transaction URL, so customers
238238
* will get a message 'Sorry your transaction was not accepted.'.
@@ -244,8 +244,8 @@ public static function redirect_url( $url, Payment $payment ) {
244244
$args['return'] = 'cancel';
245245

246246
break;
247-
case Statuses::EXPIRED:
248-
case Statuses::FAILURE:
247+
case PaymentStatus::EXPIRED:
248+
case PaymentStatus::FAILURE:
249249
/*
250250
* Remove 'sessionid' paramater from the transaction URL, so customers
251251
* will get a message 'Sorry your transaction was not accepted.'.
@@ -257,8 +257,8 @@ public static function redirect_url( $url, Payment $payment ) {
257257
$args['return'] = 'error';
258258

259259
break;
260-
case Statuses::SUCCESS:
261-
case Statuses::OPEN:
260+
case PaymentStatus::SUCCESS:
261+
case PaymentStatus::OPEN:
262262
default:
263263
break;
264264
}

0 commit comments

Comments
 (0)