Dancer2-Plugin-Interchange6

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Interchange6/Business/OnlinePayment.pm  view on Meta::CPAN


	eval { $bop_object->submit(); };

	if ($@) {
		die "Payment with provider ", $self->{provider}, " failed: ", $@;
	}

	if ( $bop_object->is_success() ) {
        $self->_set_is_success(1);

		if ( $bop_object->can('popup_url') ) {
			debug( "Success!  Redirect browser to " . $bop_object->popup_url() );
		}
        else {
            debug("Successful payment, authorization: ",
                  $bop_object->authorization);
            debug("Order number: ", $bop_object->order_number);
            $self->_set_authorization($bop_object->authorization);
            $self->_set_order_number($bop_object->order_number);
        }
	}
	else {

t/lib/Business/OnlinePayment/MockPopup.pm  view on Meta::CPAN

package Business::OnlinePayment::MockPopup;

use warnings;
use strict;

use base 'Business::OnlinePayment::MockSuccess';

sub popup_url {
    return "http://localhost/payment_popup";
}

1;



( run in 0.848 second using v1.01-cache-2.11-cpan-364913b4093 )