diff --git a/lib/WebGUI/Shop/PayDriver.pm b/lib/WebGUI/Shop/PayDriver.pm index b2dc713a3..5c3417f1c 100644 --- a/lib/WebGUI/Shop/PayDriver.pm +++ b/lib/WebGUI/Shop/PayDriver.pm @@ -489,51 +489,6 @@ sub getName { #------------------------------------------------------------------- -=head2 getSelectAddressButton ( returnMethod, [ buttonLabel ] ) - -Generates a button for selecting an address. - -=head3 returnMethod - -The name of the www_ method the selected addressId should be returned to. Without the 'www_' part. - -=head3 buttonLabel - -The label for the button, defaults to the internationalized version of 'Choose billing address'. - -=cut - -sub getSelectAddressButton { - my $self = shift; - my $returnMethod = shift; - my $buttonLabel = shift || 'Choose billing address'; - my $session = $self->session; - - # Generate the json string that defines where the address book posts the selected address - my $callbackParams = { - url => $session->url->page, - params => [ - { name => 'shop', value => 'pay' }, - { name => 'method', value => 'do' }, - { name => 'do', value => $returnMethod }, - { name => 'paymentGatewayId', value => $self->getId }, - ], - }; - my $callbackJson = JSON::to_json( $callbackParams ); - - # Generate 'Choose billing address' button - my $addressButton = WebGUI::Form::formHeader( $session ) - . WebGUI::Form::hidden( $session, { name => 'shop', value => 'address' } ) - . WebGUI::Form::hidden( $session, { name => 'method', value => 'view' } ) - . WebGUI::Form::hidden( $session, { name => 'callback', value => $callbackJson } ) - . WebGUI::Form::submit( $session, { value => $buttonLabel } ) - . WebGUI::Form::formFooter( $session ); - - return $addressButton; -} - -#------------------------------------------------------------------- - =head2 handlesRecurring () Returns 0. Should be overridden to return 1 by any subclasses that can handle recurring payments.