Skip to content

Commit

Permalink
Fix nesting problem in PayPal affecting b_state
Browse files Browse the repository at this point in the history
when pp_use_billing_address was set. Original code would have the effect
of never allowing b_state to be updated on a second return from PayPal.
It seems the idea for b_state & state to be updated in this spot is for
Canadian changes.
  • Loading branch information
jlav1n committed Nov 28, 2016
1 parent f8c6b3e commit a452f1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Vend/Payment/PaypalExpress.pm
Expand Up @@ -1049,11 +1049,10 @@ return $Tag->deliver({ location => $redirecturl });
$state = 'QC' if ($state =~ /Quebec|^QC$/i);
$state = 'SK' if ($state =~ /Saskatchewan|^SK$/i);
$state = 'YT' if ($state =~ /Yukon|^YT$/i);
}

$::Values->{'b_state'} = $state if ($::Values->{'pp_use_billing_address'} == 1);
$::Values->{'state'} = $state;

}

}

#------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit a452f1c

Please sign in to comment.