| 1 | package Net::Braintree::Validations; | ||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | |||||||||||||||
| 4 | 1 | ▶ | use Net::Braintree::Util; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 1 | ▶ | use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS ); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 1 | ▶ | use Exporter; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | 1 | our @ISA = qw(Exporter); | |||||||||||||
| 8 | 1 | our @EXPORT_OK = qw(verify_params address_signature client_token_signature_with_customer_id client_token_signature_without_customer_id credit_card_signature customer_signature transaction_signature clone_transaction_signature merchant_account_signature transaction_search_results_signature); | |||||||||||||
| 9 | |||||||||||||||
| 10 | 0 | ▶ | sub verify_params { | ||||||||||||
|
Subroutine
verify_params: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||
| 11 | 0 | my ($params, $white_list) = @_; | |||||||||||||
| 12 | 0 | foreach(keys %$params) { | |||||||||||||
| 13 | 0 | my $key = $_; | |||||||||||||
| 14 | 0 | my $sub_white_list = $white_list-> {$key}; | |||||||||||||
| 15 | 0 | ▶ | return 0 unless($sub_white_list); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 16 | 0 | ▶ | if (is_hashref($sub_white_list)) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 17 | 0 | ▶ | return 0 unless verify_params($params->{$key}, $sub_white_list); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 18 | } elsif (is_hashref($params->{$key})) { | ||||||||||||||
| 19 | 0 | ▶ | return 0 if $sub_white_list ne "_any_key_"; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 20 | } | ||||||||||||||
| 21 | } | ||||||||||||||
| 22 | 0 | return 1; | |||||||||||||
| 23 | } | ||||||||||||||
| 24 | |||||||||||||||
| 25 | 0 | ▶ | sub search_results_signature { | ||||||||||||
|
Subroutine
search_results_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 26 | return { | ||||||||||||||
| 27 | 0 | page_size => ".", | |||||||||||||
| 28 | ids => "." | ||||||||||||||
| 29 | }; | ||||||||||||||
| 30 | } | ||||||||||||||
| 31 | |||||||||||||||
| 32 | 0 | ▶ | sub transaction_search_results_signature { | ||||||||||||
|
Subroutine
transaction_search_results_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 33 | return { | ||||||||||||||
| 34 | 0 | search_results => search_results_signature | |||||||||||||
| 35 | }; | ||||||||||||||
| 36 | } | ||||||||||||||
| 37 | |||||||||||||||
| 38 | 0 | ▶ | sub address_signature { | ||||||||||||
|
Subroutine
address_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 39 | return { | ||||||||||||||
| 40 | 0 | company => ".", country_code_alpha2 => ".", country_code_alpha3 => ".", country_code_numeric => ".", | |||||||||||||
| 41 | country_name => ".", extended_address => ".", first_name => ".", | ||||||||||||||
| 42 | options => { update_existing => "." }, | ||||||||||||||
| 43 | last_name => ".", locality => ".", postal_code => ".", region => ".", street_address => "." | ||||||||||||||
| 44 | }; | ||||||||||||||
| 45 | } | ||||||||||||||
| 46 | |||||||||||||||
| 47 | 0 | ▶ | sub client_token_signature_with_customer_id { | ||||||||||||
|
Subroutine
client_token_signature_with_customer_id: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 48 | return { | ||||||||||||||
| 49 | 0 | customer_id => ".", | |||||||||||||
| 50 | proxy_merchant_id => ".", | ||||||||||||||
| 51 | version => ".", | ||||||||||||||
| 52 | options => { | ||||||||||||||
| 53 | make_default => ".", | ||||||||||||||
| 54 | fail_on_duplicate_payment_method => ".", | ||||||||||||||
| 55 | verify_card => "." | ||||||||||||||
| 56 | }, | ||||||||||||||
| 57 | merchant_account_id => "." | ||||||||||||||
| 58 | }; | ||||||||||||||
| 59 | } | ||||||||||||||
| 60 | |||||||||||||||
| 61 | 0 | ▶ | sub client_token_signature_without_customer_id { | ||||||||||||
|
Subroutine
client_token_signature_without_customer_id: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 62 | return { | ||||||||||||||
| 63 | 0 | proxy_merchant_id => ".", | |||||||||||||
| 64 | version => ".", | ||||||||||||||
| 65 | merchant_account_id => "." | ||||||||||||||
| 66 | }; | ||||||||||||||
| 67 | } | ||||||||||||||
| 68 | |||||||||||||||
| 69 | 0 | ▶ | sub credit_card_signature { | ||||||||||||
|
Subroutine
credit_card_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 70 | return { | ||||||||||||||
| 71 | 0 | customer_id => ".", | |||||||||||||
| 72 | billing_address_id => ".", cardholder_name => ".", cvv => ".", expiration_date => ".", | ||||||||||||||
| 73 | expiration_month => ".", expiration_year => ".", number => ".", token => ".", | ||||||||||||||
| 74 | venmo_sdk_payment_method_code => ".", | ||||||||||||||
| 75 | payment_method_nonce => ".", | ||||||||||||||
| 76 | device_session_id => ".", | ||||||||||||||
| 77 | device_data => ".", | ||||||||||||||
| 78 | fraud_merchant_id => ".", | ||||||||||||||
| 79 | options => { | ||||||||||||||
| 80 | make_default => ".", | ||||||||||||||
| 81 | verification_merchant_account_id => ".", | ||||||||||||||
| 82 | verify_card => ".", | ||||||||||||||
| 83 | update_existing_token => ".", | ||||||||||||||
| 84 | fail_on_duplicate_payment_method => ".", | ||||||||||||||
| 85 | venmo_sdk_session => "." | ||||||||||||||
| 86 | }, | ||||||||||||||
| 87 | billing_address => address_signature | ||||||||||||||
| 88 | }; | ||||||||||||||
| 89 | } | ||||||||||||||
| 90 | |||||||||||||||
| 91 | 0 | ▶ | sub customer_signature { | ||||||||||||
|
Subroutine
customer_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 92 | return { | ||||||||||||||
| 93 | 0 | company => ".", email => ".", fax => ".", first_name => ".", id => ".", last_name => ".", phone => ".", website => ".", device_data => ".", | |||||||||||||
| 94 | device_session_id => ".", fraud_merchant_id => ".", | ||||||||||||||
| 95 | credit_card => credit_card_signature, | ||||||||||||||
| 96 | payment_method_nonce => ".", | ||||||||||||||
| 97 | custom_fields => "_any_key_" | ||||||||||||||
| 98 | }; | ||||||||||||||
| 99 | } | ||||||||||||||
| 100 | |||||||||||||||
| 101 | 0 | ▶ | sub clone_transaction_signature { | ||||||||||||
|
Subroutine
clone_transaction_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 102 | 0 | return { amount => ".", "channel" => ".", options => { submit_for_settlement => "." } }; | |||||||||||||
| 103 | } | ||||||||||||||
| 104 | |||||||||||||||
| 105 | 0 | ▶ | sub transaction_signature{ | ||||||||||||
|
Subroutine
transaction_signature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 106 | return { | ||||||||||||||
| 107 | 0 | amount => ".", customer_id => ".", merchant_account_id => ".", order_id => ".", channel => ".", payment_method_token => ".", | |||||||||||||
| 108 | "payment_method_nonce" => ".", "device_session_id" => ".", "device_data" => ".", fraud_merchant_id => ".", billing_address_id => ".", | ||||||||||||||
| 109 | purchase_order_number => ".", recurring => ".", shipping_address_id => ".", type => ".", tax_amount => ".", tax_exempt => ".", | ||||||||||||||
| 110 | credit_card => {token => ".", cardholder_name => ".", cvv => ".", expiration_date => ".", expiration_month => ".", expiration_year => ".", number => "."}, | ||||||||||||||
| 111 | customer => {id => ".", company => ".", email => ".", fax => ".", first_name => ".", last_name => ".", phone => ".", website => "."} , | ||||||||||||||
| 112 | billing => address_signature, | ||||||||||||||
| 113 | shipping => address_signature, | ||||||||||||||
| 114 | options => { | ||||||||||||||
| 115 | store_in_vault => ".", | ||||||||||||||
| 116 | store_in_vault_on_success => ".", | ||||||||||||||
| 117 | submit_for_settlement => ".", | ||||||||||||||
| 118 | add_billing_address_to_payment_method => ".", | ||||||||||||||
| 119 | store_shipping_address_in_vault => ".", | ||||||||||||||
| 120 | venmo_sdk_session => ".", | ||||||||||||||
| 121 | hold_in_escrow => ".", | ||||||||||||||
| 122 | payee_email => "." | ||||||||||||||
| 123 | }, | ||||||||||||||
| 124 | paypal_account => { | ||||||||||||||
| 125 | payee_email => "." | ||||||||||||||
| 126 | }, | ||||||||||||||
| 127 | custom_fields => "_any_key_", | ||||||||||||||
| 128 | descriptor => {name => ".", phone => ".", url => "."}, | ||||||||||||||
| 129 | subscription_id => ".", | ||||||||||||||
| 130 | venmo_sdk_payment_method_code => ".", | ||||||||||||||
| 131 | service_fee_amount => ".", | ||||||||||||||
| 132 | three_d_secure_token => "." | ||||||||||||||
| 133 | }; | ||||||||||||||
| 134 | } | ||||||||||||||
| 135 | |||||||||||||||
| 136 | 1 | 1; | |||||||||||||