Subject: | post_charge complains for missing address |
Hello,
some of the tests are failing when I provide a test api key:
/live.t ...
ok 1 - API object created today isa Net::Stripe
Attribute (address_country) does not pass the type constraint because:
Validation failed for 'Str' with value undef at constructor
Net::Stripe::Card::new (defined at
/home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe/Card.pm line 56) line 31.
Net::Stripe::Card::new('Net::Stripe::Card', 'HASH(0x92272c0)')
called at /home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe/Resource.pm line 19
Class::MOP::Class:::around('CODE(0x88c0698)',
'Net::Stripe::Token', 'HASH(0x9028368)') called at
/home/dpetrov/perl5/perlbrew/perls/perl-
5.10.1/lib/site_perl/5.10.1/i686-linux/Class/MOP/Method/Wrapped.pm line
162
Class::MOP::Method::Wrapped::__ANON__('Net::Stripe::Token',
'HASH(0x9028368)') called at /home/dpetrov/perl5/perlbrew/perls/perl-
5.10.1/lib/site_perl/5.10.1/i686-linux/Class/MOP/Method/Wrapped.pm line
91
Net::Stripe::Resource::BUILDARGS('Net::Stripe::Token',
'HASH(0x9028368)') called at constructor Net::Stripe::Token::new
(defined at /home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe/Token.pm line 46) line 6
Net::Stripe::Token::new('Net::Stripe::Token', 'HASH(0x9028368)')
called at /home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe.pm line 460
Net::Stripe::hash_to_object('HASH(0x9028368)') called at
/home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe.pm line 434
Net::Stripe::_make_request('Net::Stripe=HASH(0x836c4a8)',
'HTTP::Request=HASH(0x836cdb8)') called at
/home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe.pm line 423
Net::Stripe::_post('Net::Stripe=HASH(0x836c4a8)', 'tokens',
'Net::Stripe::Token=HASH(0x836caf8)') called at
/home/dpetrov/.cpanm/work/1335367785.19670/Net-Stripe-
0.06/lib/Net/Stripe.pm line 219
Net::Stripe::post_token('Net::Stripe=HASH(0x836c4a8)', 'card',
'HASH(0x836c4e8)', 'amount', 330, 'currency', 'usd') called at t/live.t
line 29
# Tests were run but no plan was declared and done_testing() was not
seen.
Dubious, test returned 9 (wstat 2304, 0x900)
All 1 subtests passed
t/local.t ..
ok 1 - use Net::Stripe;
ok 2 - threw Regexp ((?-xism:\(api_key\) is required))
1..2
Also If I try to post a charge, here is example:
my $stripe = Net::Stripe->new(api_key => $API_KEY);
my $token = $stripe->post_token(
card => {
number => '4242424242424242',
exp_month => 12,
exp_year => 2012,
cvc => 123,
},
);
my $charge = $stripe->post_charge(
amount => 12500,
currency => 'usd',
card => $token->id,
description => 'Just another test',
);
I'm getting again the constraint error