function Braintree_TransparentRedirectTest::testCreateCustomerFromTransparentRedirect in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransparentRedirectTest.php, line 104
Class
Code
function testCreateCustomerFromTransparentRedirect() {
$params = array(
'customer' => array(
'first_name' => 'Second',
),
);
$trParams = array(
'customer' => array(
'lastName' => 'Penultimate',
),
);
$trData = Braintree_TransparentRedirect::createCustomerData(array_merge($trParams, array(
"redirectUrl" => "http://www.example.com",
)));
$queryString = Braintree_TestHelper::submitTrRequest(Braintree_TransparentRedirect::url(), $params, $trData);
$result = Braintree_TransparentRedirect::confirm($queryString);
$this
->assertTrue($result->success);
$customer = $result->customer;
$this
->assertequals('Second', $customer->firstName);
$this
->assertequals('Penultimate', $customer->lastName);
}