amiri / checkout--cybersource--soap Goto Github PK
View Code? Open in Web Editor NEWModel for CyberSource's SOAP API.
Model for CyberSource's SOAP API.
Cybersource doesn't appear to do any sanity checks on their side, replacing the expiry with 2025 will work.
PERL_DL_NONLAZY=1 /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# Testing Checkout::CyberSource::SOAP 0.04, Perl 5.014001, /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/bin/perl
t/00-load.t .. ok
# Failed test 'Success message is correct'
# at t/model.t line 88.
# got: 'Either your card has expired or you have provided the wrong expiration date. Please check it and try again.'
# expected: 'Successful transaction'
# Failed test 'Correct data is in the returned payment_info hash'
# at t/model.t line 128.
# got: undef
# expected: '09'
# Looks like you failed 2 tests of 14.
t/model.t ....
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/14 subtests
Test Summary Report
-------------------
t/model.t (Wstat: 512 Tests: 14 Failed: 2)
Failed tests: 9, 14
Non-zero exit status: 2
Files=2, Tests=15, 2 wallclock secs ( 0.03 usr 0.00 sys + 0.95 cusr 0.04 csys = 1.02 CPU)
Result: FAIL
Failed 1/2 test programs. 2/15 subtests failed.
make: *** [test_dynamic] Error 2
this is a dump of a response that has success... doesn't seem to be actually successful. I've been going off your pod docs but they do not seem to align with actual implementation
VAR1 = bless( {
'success' => {
'message' => 'Your bank declined your card for an unspecified reason. Please try another card.'
},
'handler' => {
'237' => sub { "DUMMY" },
'204' => sub { "DUMMY" },
'241' => sub { "DUMMY" },
'102' => sub { "DUMMY" },
'200' => sub { "DUMMY" },
'100' => sub { "DUMMY" },
'246' => sub { "DUMMY" },
'240' => sub { "DUMMY" },
'233' => sub { "DUMMY" },
'250' => sub { "DUMMY" },
'236' => sub { "DUMMY" },
'230' => sub { "DUMMY" },
'202' => sub { "DUMMY" },
'243' => sub { "DUMMY" },
'231' => sub { "DUMMY" },
'201' => sub { "DUMMY" },
'232' => sub { "DUMMY" },
'151' => sub { "DUMMY" },
'150' => sub { "DUMMY" },
'152' => sub { "DUMMY" },
'207' => sub { "DUMMY" },
'234' => sub { "DUMMY" },
'239' => sub { "DUMMY" },
'208' => sub { "DUMMY" },
'205' => sub { "DUMMY" },
'235' => sub { "DUMMY" },
'238' => sub { "DUMMY" },
'203' => sub { "DUMMY" },
'221' => sub { "DUMMY" },
'210' => sub { "DUMMY" },
'211' => sub { "DUMMY" },
'209' => sub { "DUMMY" },
'101' => sub { "DUMMY" },
'247' => sub { "DUMMY" },
'242' => sub { "DUMMY" }
},
'payment_info' => {}
}, 'Checkout::CyberSource::SOAP::Response' );
so it appears from this that I'm not providing all the right inputs... it'd be nice if it'd tell me which parameter is missing.
Business-OnlinePayment-CyberSource [moose] % prove -l t/05-soap.t hgcc
t/05-soap.t .. Use of uninitialized value in hash element at /home/ccushing/perl5/perlbrew/perls/perl- 5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 168.
Use of uninitialized value within @_ in list assignment at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 108.
Use of uninitialized value in hash element at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 168.
Use of uninitialized value within @_ in list assignment at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 108.
Use of uninitialized value in hash element at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 174.
Use of uninitialized value within @_ in list assignment at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 108.
Can't locate object method "new" via package "Checkout::CyberSource::SOAP::Response" (perhaps you forgot to load "Checkout::CyberSource::SOAP::Response"?) at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Checkout/CyberSource/SOAP.pm line 104.
t/05-soap.t .. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
again adding a patch to fix this
[DZ] Override README from [ReadmeFromPod]
[DZ] attempt to add README multiple times; added by: @Filter/GatherDir (Dist::Zilla::Plugin::GatherDir line 76); @Filter/Readme (Dist::Zilla::Plugin::Readme line 37)
aborting; duplicate files would be produced at /home/ccushing/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Dist/Zilla/App/Command/test.pm line 27
right now the dist.ini has both README and ReadmeFromPod, your readme appears to be the same as the pod, so it'd appear to be just easier to let distzilla generate it. I had set that up for you, but you appear to have reverted those changes. Which would you prefer? if you're keeping a README file for github, I'd suggest using DZP::Git::CommitBuild and making the build/master branch the default on github. This is what I do. I'd definitely recommend adding Dist::Zilla::Plugin::Git stuff for managing version numbers so you don't have to auto increment it.
these files use windows line endings and used mixed tabs and spaces to indent, so they fail Test::NoTabs and Test::EOL
this dist doesn't have a Change log of any kind. I'm adding one, in a patch but you'll have to fill out the stub with old release history.
Pod coverage tests fail, and therefore so do kwalitee tests.
Had to add use Checkout::CyberSource::SOAP::Response
to some code I was writing to get the module to work. This should be in ::SOAP
not my code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.