The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use Test::More tests => 2;

use Business::Payment;
use Business::Payment::Charge;
use Business::Payment::Processor::Test::False;

my $bp = Business::Payment->new(
    processor => Business::Payment::Processor::Test::False->new
);

my $charge = Business::Payment::Charge->new(
    amount => 10.00
);

my $result = $bp->handle($charge);
isa_ok($result, 'Business::Payment::Result', 'result class');
ok(!$result->success, 'failed charge');