Skip to content

Commit

Permalink
Support pending subscription ITNs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlimaza committed Nov 4, 2024
1 parent 2b37b30 commit 1248f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/class.pmprogateway_payfast.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ function update_subscription_info( $subscription ) {
$update_array = array();

// Get the subscription status and update it accordingly.
if ( $sub_info->status !== 1 ) {
// Status 1 = COMPLETED, Status 7 = UPSTREAM. We assume that status 7 is pending approval and okay and assume we're good.
if ( ! in_array( $sub_info->status, array( 1, 7 ) ) ) {
$update_array['status'] = 'cancelled';
} else {
$update_array['status'] = 'active';
Expand Down

0 comments on commit 1248f7b

Please sign in to comment.