diff options
author | plobbes <plobbes> | 2009-08-22 05:42:29 +0000 |
---|---|---|
committer | plobbes <plobbes> | 2009-08-22 05:42:29 +0000 |
commit | 0cd63fdf0f05f7cf304d07707ddd2dae1cce268a (patch) | |
tree | 757415129ea6a14c3d9e9b59a16c54a48fe44e71 /t/bop.t | |
parent | ccb61d83ed0a79a4eb6a8f55beadfb22705629e8 (diff) |
- bump version to 1.00, should have probably done this with 0.07 as it
was a radical enough departure from 0.06, also BOP 3.x is no longer
just a developers release
- rt.cpan.org#48696 Use CGI::Util instead of CGI
Josh Rosenbaum
+ updated code to be faster/more efficient
- rt.cpan.org#48816 Request Encoding Issue & Missing fields
Josh Rosenbaum
+ use PayPal custom encoding (not URL encoding) per PP spec
+ added missing shipping parameters similar to Authorize.Net
- rt.cpan.org#48820 %content not reloaded after mapping breaks credits
Josh Rosenbaum
+ fix a problem with credits where the ACCT, AMT, and EXPDATE were
being required, because the ORIGID detection code was not working
- addition test cases for updated code
Diffstat (limited to 't/bop.t')
-rw-r--r-- | t/bop.t | 42 |
1 files changed, 41 insertions, 1 deletions
@@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More tests => 30; use Business::OnlinePayment; @@ -98,3 +98,43 @@ my $driver = "PayflowPro"; is( $obj->request_id($id), $id, "request_id() can be set" ); is( $obj->request_id, $id, "request_id() remains set" ); } + +{ # _get_response - response parsing + my $obj = $package->new($driver); + + is_deeply( + $obj->_get_response('%66%6F%78=%71%75%69%63%6B%20%25%26%3B&e=3+3'), + { fox => 'quick %&;', e => '3 3' }, + "_get_response 1 returns correct value" + ); + is_deeply( + $obj->_get_response('Foo=&&&&;;ab=t+t;q=2'), + { Foo => '', ab => 't t', q => '2' }, + "_get_response 2 returns correct value" + ); + is_deeply( + $obj->_get_response('f=s'), + { f => 's' }, + "_get_response 3 returns correct value" + ); + is_deeply( $obj->_get_response(''), + {}, "_get_response 4 returns correct value" ); + is_deeply( $obj->_get_response(undef), + {}, "_get_response 5 returns correct value" ); + is_deeply( + $obj->_get_response( +'RESULT=0&PNREF=QAAA1DF4B4F4&RESPMSG=Approved&AUTHCODE=111PNQ&AVSADDR=X&AVSZIP=X&CVV2MATCH=Y&IAVS=X' + ), + { + RESULT => '0', + PNREF => 'QAAA1DF4B4F4', + RESPMSG => 'Approved', + AUTHCODE => '111PNQ', + AVSADDR => 'X', + AVSZIP => 'X', + CVV2MATCH => 'Y', + IAVS => 'X' + }, + "_get_response 6 returns correct value" + ); +} |