fixed issue with ITransact gateway throwing error if user does not explicitly set a billing address

This commit is contained in:
Doug Bell 2008-08-09 03:25:55 +00:00
parent 27cd075753
commit 9ecb69ac94
2 changed files with 14 additions and 5 deletions

View file

@ -6,6 +6,8 @@
Tests were updated, but need are still lacking and need a major overhaul.
- fixed: ITransact error message now shows a link to go back to checkout
- fixed: Gallery image information now does not overlap the snapshot. Changed css .wgSnapshot to be 25% vs 20%.
- fixed: ITransact now defaults to using shipping address for billing address. This prevents an
issue when users neglect to select a proper billing address.
7.5.19
- fixed: paginator doesn't show correct number of page links with a limit applied

View file

@ -608,11 +608,14 @@ sub www_getCredentials {
my $u = WebGUI::User->new($self->session,$self->session->user->userId);
# Process address from address book if passed
my $addressId = $session->form->process('addressId');
my $addressData = {};
my $addressId = $session->form->process( 'addressId' );
my $addressData;
if ( $addressId ) {
$addressData = eval{ $self->getAddress( $addressId )->get() } || {};
}
else {
$addressData = $self->getCart->getShippingAddress;
}
my $output;
@ -704,9 +707,13 @@ sub www_getCredentials {
#-------------------------------------------------------------------
sub www_pay {
my $self = shift;
my $session = $self->session;
my $address = $self->getAddress( $session->form->process( 'addressId' ) );
my $self = shift;
my $session = $self->session;
my $addressId = $session->form->process( 'addressId' )
my $address = $addressId
? $self->getAddress( $addressId )
: $self->getCart->getShippingAddress
;
# Check whether the user filled in the checkout form and process those.
my $credentialsErrors = $self->processCredentials;