0.05
[Business-OnlinePayment-InternetSecure.git] / t / 50idempotence.t
1 # vim:set syntax=perl encoding=utf-8:
2
3 # get_remap_fields() used to be destructive (via remap_fields), and thus
4 # to_xml couldn't be called by itself.
5
6 use Test::More tests => 1 + 1;
7
8 BEGIN { use_ok('Business::OnlinePayment') };
9
10 use constant TRANSACTION =>
11         (
12                 action          => 'Normal Authorization',
13
14                 card_number     => '5111-1111-1111-1111',
15                 expiration      => '0704',
16
17                 name            => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
18
19                 amount          => 13.95,
20         );
21
22
23 my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000';
24
25 $txn->content(TRANSACTION);
26
27 is($txn->to_xml, $txn->to_xml, 'idempotence');
28