sale() публичный статический Метод

public static sale ( $token, $transactionAttribs )
Пример #1
0
 public function testSale_createsASaleUsingGivenToken()
 {
     $customer = Braintree\Customer::createNoValidate(array('creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12')));
     $creditCard = $customer->creditCards[0];
     $result = Braintree\CreditCard::sale($creditCard->token, array('amount' => '100.00'));
     $this->assertTrue($result->success);
     $this->assertEquals('100.00', $result->transaction->amount);
     $this->assertEquals($customer->id, $result->transaction->customerDetails->id);
     $this->assertEquals($creditCard->token, $result->transaction->creditCardDetails->token);
 }