File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -52,21 +52,17 @@ public function confirm( $payload ) {
5252 }
5353
5454 switch ( $ payload ['status ' ] ) {
55- case 'pending ' :
56- switch ( $ payload ['status_reason ' ] ) {
57- case 'confirmation_required ' :
58- if ( method_exists ( $ order , 'payment_complete ' ) ) {
59- if ( version_compare ( WC_VERSION , '3.0 ' , '< ' ) ) {
60- $ order ->payment_complete ();
61- break ;
62- }
63- if ( ! $ order ->payment_complete () ) {
64- return self ::ko ( "'payment_complete' function failed " );
65- }
66- } else {
67- $ order ->update_status ( 'processing ' , sprintf ( __ ( 'Confirmed ' , 'aplazame ' ) ) );
68- }
55+ case 'ok ' :
56+ if ( method_exists ( $ order , 'payment_complete ' ) ) {
57+ if ( version_compare ( WC_VERSION , '3.0 ' , '< ' ) ) {
58+ $ order ->payment_complete ();
6959 break ;
60+ }
61+ if ( ! $ order ->payment_complete () ) {
62+ return self ::ko ( "'payment_complete' function failed " );
63+ }
64+ } else {
65+ $ order ->update_status ( 'processing ' , sprintf ( __ ( 'Confirmed ' , 'aplazame ' ) ) );
7066 }
7167 break ;
7268 case 'ko ' :
You can’t perform that action at this time.
0 commit comments