>expiration_month + 0 > 0;
ok $apple_pay_detail->expiration_year + 0 > 0;
isnt($apple_pay_detail->cardholder_name, undef);
};
};
};
subtest "three_d_secure" => sub
validate_result($result) or return;
my $transaction = $result->transaction;
isnt($transaction->paypal_details->debug_id, undef);
};
};
subtest "Disbursement Details" => sub
te_result($clone_result) or return;
my $clone_transaction = $clone_result->transaction;
isnt $clone_transaction->id, $sale_result->transaction->id;
cmp_ok $clone_transaction->amount, '==
validate_result($payment_method_result) or return;
isnt($payment_method_result->paypal_account->token, undef);
isnt($payment_method_result->paypal_account->image_url, undef);
_nonce => $nonce,
});
validate_result($payment_method_result) or return;
isnt($payment_method_result->credit_card->token, undef);
is(blessed($payment_method_result->cr
_result) or return;
my $apple_pay_card = $payment_method_result->apple_pay_card;
isnt($apple_pay_card->token, undef);
is(blessed($apple_pay_card), "WebService::Braintree::_::A
isnt($result->paypal_account->image_url, undef);
my $found = WebService::Braintree::PayPalAccount->find($result->paypal_account->token);
isnt($found, undef);
isnt($foun
d->email, undef);
isnt($found->image_url, undef);
isnt($found->created_at, undef);
isnt($found->updated_at, undef);
ok($found->email eq $result->paypal_account->email);
ransparentRedirect->confirm($query_string_response);
validate_result($result) or return;
isnt($result->customer->id, undef) or return;
is $result->customer->first_name, "Sally", "First na
ransparentRedirect->confirm($query_string_response);
validate_result($result) or return;
isnt($result->customer, undef) or return
is $result->customer->first_name, "Steve", "changes custo
onse);
validate_result($result) or return;
subtest "result credit card" => sub {
isnt($result->credit_card, undef) or return;
is $result->credit_card->last_4, cc_last4($cc_num
d credit card" => sub {
my $customer = WebService::Braintree::Customer->create->customer;
isnt($customer->id, undef, '.. customer->id is defined');
my $test_cc_number = cc_number();
m
tionYear => "2020",
options => {
validate => "false",
},
});
isnt($nonce, undef, '.. nonce is defined');
my $result = WebService::Braintree::PaymentMethod->cr
street_address => "123 Abc Way",
},
});
validate_result($result) or return;
isnt($result->payment_method, undef, '.. we have a payment method');
my $token = $result->payment_
is($result->customer->first_name, "Johnny", "sets customer attributes (first name)");
isnt($result->customer->id, undef, "customer id != blank");
};
subtest "with CC and billing a
e_result($customer_result) or return;
my $customer = $customer_result->customer;
isnt($customer->paypal_accounts, undef);
is(scalar @{$customer->paypal_accounts}, 1);
};
otification->kind, WebService::Braintree::WebhookNotification::Kind::SubscriptionWentPastDue;
isnt $webhook_notification->timestamp, undef;
is $webhook_notification->subscription->id, 'my_id';
tification->transaction->id, 'my_id';
is $webhook_notification->transaction->amount, 100;
isnt $webhook_notification->transaction->disbursement_details->disbursement_date, undef;
};
subtest '
is $result->subscription->plan_id, WebService::Braintree::TestHelper->TRIALLESS_PLAN_ID;
isnt $result->subscription->transactions->[0], undef;
is $result->subscription->failure_count, 0
ent->new($disbursement_params);
my $transactions = $disbursement->transactions();
isnt $transactions, undef;
is($transactions->first()->id(), "sub_merchant_transaction");