Branch Coverage

blib/lib/Business/Stripe/WebCheckout.pm
Criterion Covered Total %
branch 8 74 10.8


line true false branch
35 0 2 unless $attrs{'cancel-url'} and $attrs{'success-url'}
40 0 2 if $attrs{'api-public'} and not $attrs{'api-public'} =~ /^pk_/
41 0 2 unless $attrs{'api-secret'} =~ /^sk_/
42 0 2 if $attrs{'api-public'} and $attrs{'api-public'} =~ /^sk_/
43 0 2 if $attrs{'api-secret'} =~ /^pk_/
44 1 1 unless length $attrs{'api-secret'} > 100
45 0 2 unless $attrs{'api-secret'}
64 0 0 unless ($product{'price'} > 0 and not $product{'price'} =~ /\./)
68 0 0 unless ($product{'qty'} > 0 and not $product{'qty'} =~ /\./)
73 0 0 unless ($product{'name'})
80 0 0 if ($prod->{'id'} eq $product{'id'})
108 0 0 unless ($id)
114 0 0 if ($prod->{'id'} eq $id)
125 0 0 unless ($id)
131 0 0 if (do { $$self{"trolley"} }->[$i]{'id'} eq $id)
146 0 0 if ($self->{'intent'})
159 0 0 if ($self->{'url'} =~ m[^https://www\.boddison\.com])
162 0 0 if $self->{'api-test-fail'}
176 0 0 if $self->{'email'}
177 0 0 if ($self->{'getShipping'})
185 0 0 if $prod->{'description'}
194 0 0 if ($response->{'success'}) { }
201 0 0 if ($@) { }
212 0 0 if $attrs{'reference'}
213 0 0 if $attrs{'email'}
222 0 0 if $attrs{'reference'}
223 0 0 if $attrs{'email'}
227 0 0 if ($self->{'error'}) { }
237 0 0 if $attrs{'public-key'}
240 0 0 unless ($self->{'api-public'})
245 0 0 if $attrs{'reference'}
246 0 0 if $attrs{'email'}
251 0 0 if ($self->{'error'}) { }
260 0 0 unless $attrs{'format'}
261 0 0 if lc $attrs{'format'} eq "json"
270 0 0 if $self->{'error'}
274 0 0 unless ($key and $session)