Debian Codegraph @

t/lib/test_account.pl

raw symbols SCIP
1 sub test_account_or_skipscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/test_account_or_skip(). {
2 my $suffix = shiftscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/shift().;
3 my($login, $password, %opt) = test_accountscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/test_account().($suffix);
4
5 unless( definedscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/defined(). $login ) {
6 planscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/plan(). skip_all => "No test account";
7 }
8
9 return($login, $password, %opt);
10 }
11
12 sub test_accountscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/test_account(). {
13 my $suffix = shiftscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/shift(). || 'card';
14
15 my($login, $password) = ('TESTTERMINAL', '');
16
17 my %opt;
18 if ( $suffix eq 'check ' ) {
19 %opt = ('Origin' => 'RECURRING');
20 } else {
21 %opt = ('default_Origin' => 'RECURRING');
22 }
23
24 return($login, $password, %opt);
25 }
26
27 sub expiration_datescip-perl cpan Business-OnlinePayment-IPPay 0.12 main/expiration_date(). {
28 my($month, $year) = (localtimescip-perl cpan Business-OnlinePayment-IPPay 0.12 main/localtime().)[4,5];
29 $month += 1;
30 $year++; # So we expire next year.
31 $year %= 100; # y2k? What's that?
32
33 return sprintfscip-perl cpan Business-OnlinePayment-IPPay 0.12 main/sprintf().("%02d/%02d", $month, $year);
34 }
35
36 #sub tomorrow {
37 # my($day, $month, $year) = (localtime(time+86400))[3..5];
38 # return sprintf("%04d-%02d-%02d", $year+1900, ++$month, $day);
39 #}
40
41 1;
42