credit() 공개 정적인 메소드

public static credit ( integer $customerId, array $transactionAttribs ) : Braintree\Result\Successful | Error
$customerId integer
$transactionAttribs array
리턴 Braintree\Result\Successful | Braintree\Result\Error
예제 #1
0
 public function testCredit_createsACreditUsingGivenCustomerId()
 {
     $customer = Braintree\Customer::createNoValidate(['creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12']]);
     $creditCard = $customer->creditCards[0];
     $result = Braintree\Customer::credit($customer->id, ['amount' => '100.00']);
     $this->assertTrue($result->success);
     $this->assertEquals('100.00', $result->transaction->amount);
     $this->assertEquals(Braintree\Transaction::CREDIT, $result->transaction->type);
     $this->assertEquals($customer->id, $result->transaction->customerDetails->id);
     $this->assertEquals($creditCard->token, $result->transaction->creditCardDetails->token);
 }