Ejemplo n.º 1
0
 public function testCreate_withVenmoSdkSession()
 {
     $result = Braintree\Customer::create(['firstName' => 'Bat', 'lastName' => 'Manderson', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12', 'options' => ['venmoSdkSession' => Braintree\Test\VenmoSdk::getTestSession()]]]);
     $this->assertEquals(true, $result->success);
     $customer = $result->customer;
     $this->assertEquals(true, $customer->creditCards[0]->venmoSdk);
 }
Ejemplo n.º 2
0
 public function testCreate_with_venmoSdkSession()
 {
     $customer = Braintree\Customer::createNoValidate();
     $result = Braintree\CreditCard::create(array('customerId' => $customer->id, 'number' => '5105105105105100', 'expirationDate' => '05/12', 'options' => array('venmoSdkSession' => Braintree\Test\VenmoSdk::getTestSession())));
     $this->assertTrue($result->success);
     $this->assertTrue($result->creditCard->isVenmoSdk());
 }
Ejemplo n.º 3
0
 public function testSale_withVenmoSdkSession()
 {
     $result = Braintree\Transaction::sale(['amount' => '10.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12'], 'options' => ['venmoSdkSession' => Braintree\Test\VenmoSdk::getTestSession()]]);
     $this->assertEquals(true, $result->success);
     $transaction = $result->transaction;
     $this->assertEquals(true, $transaction->creditCardDetails->venmoSdk);
 }