line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Braintree::Gateway; |
2
|
|
|
|
|
|
|
$WebService::Braintree::Gateway::VERSION = '0.94'; |
3
|
20
|
|
|
20
|
|
287
|
use 5.010_001; |
|
20
|
|
|
|
|
61
|
|
4
|
20
|
|
|
20
|
|
96
|
use strictures 1; |
|
20
|
|
|
|
|
102
|
|
|
20
|
|
|
|
|
678
|
|
5
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
6008
|
use WebService::Braintree::AddressGateway; |
|
20
|
|
|
|
|
61
|
|
|
20
|
|
|
|
|
730
|
|
7
|
20
|
|
|
20
|
|
6913
|
use WebService::Braintree::ClientTokenGateway; |
|
20
|
|
|
|
|
65
|
|
|
20
|
|
|
|
|
724
|
|
8
|
20
|
|
|
20
|
|
6377
|
use WebService::Braintree::CreditCardGateway; |
|
20
|
|
|
|
|
57
|
|
|
20
|
|
|
|
|
715
|
|
9
|
20
|
|
|
20
|
|
6631
|
use WebService::Braintree::CreditCardVerificationGateway; |
|
20
|
|
|
|
|
62
|
|
|
20
|
|
|
|
|
746
|
|
10
|
20
|
|
|
20
|
|
6683
|
use WebService::Braintree::CustomerGateway; |
|
20
|
|
|
|
|
67
|
|
|
20
|
|
|
|
|
699
|
|
11
|
20
|
|
|
20
|
|
6642
|
use WebService::Braintree::MerchantAccountGateway; |
|
20
|
|
|
|
|
59
|
|
|
20
|
|
|
|
|
780
|
|
12
|
20
|
|
|
20
|
|
6790
|
use WebService::Braintree::PaymentMethodGateway; |
|
20
|
|
|
|
|
56
|
|
|
20
|
|
|
|
|
712
|
|
13
|
20
|
|
|
20
|
|
6573
|
use WebService::Braintree::PaymentMethodNonceGateway; |
|
20
|
|
|
|
|
57
|
|
|
20
|
|
|
|
|
712
|
|
14
|
20
|
|
|
20
|
|
6692
|
use WebService::Braintree::PayPalAccountGateway; |
|
20
|
|
|
|
|
56
|
|
|
20
|
|
|
|
|
695
|
|
15
|
20
|
|
|
20
|
|
6234
|
use WebService::Braintree::PlanGateway; |
|
20
|
|
|
|
|
60
|
|
|
20
|
|
|
|
|
669
|
|
16
|
20
|
|
|
20
|
|
6164
|
use WebService::Braintree::SettlementBatchSummaryGateway; |
|
20
|
|
|
|
|
57
|
|
|
20
|
|
|
|
|
649
|
|
17
|
20
|
|
|
20
|
|
131
|
use WebService::Braintree::SubscriptionGateway; |
|
20
|
|
|
|
|
37
|
|
|
20
|
|
|
|
|
464
|
|
18
|
20
|
|
|
20
|
|
6307
|
use WebService::Braintree::TransactionGateway; |
|
20
|
|
|
|
|
56
|
|
|
20
|
|
|
|
|
657
|
|
19
|
20
|
|
|
20
|
|
6117
|
use WebService::Braintree::TransparentRedirectGateway; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use WebService::Braintree::WebhookNotificationGateway; |
21
|
|
|
|
|
|
|
use WebService::Braintree::WebhookTestingGateway; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Moose; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'config' => (is => 'ro'); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# TODO: Convert this into a loop around a hash. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'address' => (is => 'ro', lazy => 1, default => sub { |
30
|
|
|
|
|
|
|
my $self = shift; |
31
|
|
|
|
|
|
|
WebService::Braintree::AddressGateway->new(gateway => $self); |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has 'client_token' => (is => 'ro', lazy => 1, default => sub { |
35
|
|
|
|
|
|
|
my $self = shift; |
36
|
|
|
|
|
|
|
WebService::Braintree::ClientTokenGateway->new(gateway => $self); |
37
|
|
|
|
|
|
|
}); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has 'credit_card' => (is => 'ro', lazy => 1, default => sub { |
40
|
|
|
|
|
|
|
my $self = shift; |
41
|
|
|
|
|
|
|
WebService::Braintree::CreditCardGateway->new(gateway => $self); |
42
|
|
|
|
|
|
|
}); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has 'credit_card_verification' => (is => 'ro', lazy => 1, default => sub { |
45
|
|
|
|
|
|
|
my $self = shift; |
46
|
|
|
|
|
|
|
WebService::Braintree::CreditCardVerificationGateway->new(gateway => $self); |
47
|
|
|
|
|
|
|
}); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'customer' => (is => 'ro', lazy => 1, default => sub { |
50
|
|
|
|
|
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
WebService::Braintree::CustomerGateway->new(gateway => $self); |
52
|
|
|
|
|
|
|
}); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
has 'merchant_account' => (is => 'ro', lazy => 1, default => sub { |
55
|
|
|
|
|
|
|
my $self = shift; |
56
|
|
|
|
|
|
|
WebService::Braintree::MerchantAccountGateway->new(gateway => $self); |
57
|
|
|
|
|
|
|
}); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
has 'payment_method' => (is => 'ro', lazy => 1, default => sub { |
60
|
|
|
|
|
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
WebService::Braintree::PaymentMethodGateway->new(gateway => $self); |
62
|
|
|
|
|
|
|
}); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has 'payment_method_nonce' => (is => 'ro', lazy => 1, default => sub { |
65
|
|
|
|
|
|
|
my $self = shift; |
66
|
|
|
|
|
|
|
WebService::Braintree::PaymentMethodNonceGateway->new(gateway => $self); |
67
|
|
|
|
|
|
|
}); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has 'paypal_account' => (is => 'ro', lazy => 1, default => sub { |
70
|
|
|
|
|
|
|
my $self = shift; |
71
|
|
|
|
|
|
|
WebService::Braintree::PayPalAccountGateway->new(gateway => $self); |
72
|
|
|
|
|
|
|
}); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
has 'plan' => (is => 'ro', lazy => 1, default => sub { |
75
|
|
|
|
|
|
|
my $self = shift; |
76
|
|
|
|
|
|
|
WebService::Braintree::PlanGateway->new(gateway => $self); |
77
|
|
|
|
|
|
|
}); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
has 'settlement_batch_summary' => (is => 'ro', lazy => 1, default => sub { |
80
|
|
|
|
|
|
|
my $self = shift; |
81
|
|
|
|
|
|
|
WebService::Braintree::SettlementBatchSummaryGateway->new(gateway => $self); |
82
|
|
|
|
|
|
|
}); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
has 'subscription' => (is => 'ro', lazy => 1, default => sub { |
85
|
|
|
|
|
|
|
my $self = shift; |
86
|
|
|
|
|
|
|
WebService::Braintree::SubscriptionGateway->new(gateway => $self); |
87
|
|
|
|
|
|
|
}); |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
has 'transaction' => (is => 'ro', lazy => 1, default => sub { |
90
|
|
|
|
|
|
|
my $self = shift; |
91
|
|
|
|
|
|
|
WebService::Braintree::TransactionGateway->new(gateway => $self); |
92
|
|
|
|
|
|
|
}); |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
has 'transparent_redirect' => (is => 'ro', lazy => 1, default => sub { |
95
|
|
|
|
|
|
|
my $self = shift; |
96
|
|
|
|
|
|
|
WebService::Braintree::TransparentRedirectGateway->new(gateway => $self); |
97
|
|
|
|
|
|
|
}); |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
has 'webhook_notification' => (is => 'ro', lazy => 1, default => sub { |
100
|
|
|
|
|
|
|
my $self = shift; |
101
|
|
|
|
|
|
|
WebService::Braintree::WebhookNotificationGateway->new(gateway => $self); |
102
|
|
|
|
|
|
|
}); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
has 'webhook_testing' => (is => 'ro', lazy => 1, default => sub { |
105
|
|
|
|
|
|
|
my $self = shift; |
106
|
|
|
|
|
|
|
WebService::Braintree::WebhookTestingGateway->new(gateway => $self); |
107
|
|
|
|
|
|
|
}); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub http { |
110
|
|
|
|
|
|
|
WebService::Braintree::HTTP->new(config => shift->config); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
1; |
116
|
|
|
|
|
|
|
__END__ |