コード例 #1
0
ファイル: BraintreeFormTest.php プロジェクト: skamnev/members
 /**
  * @depends testCustomerCreate
  */
 public function testTokenPayment()
 {
     $customer = \Braintree_Customer::find(self::$customer->id);
     $this->assertInstanceOf('\\Braintree_Customer', $customer);
     $this->assertArrayHasKey(0, $customer->paymentMethods());
     $model = new BraintreeForm();
     $model->setScenario('saleFromVault');
     $this->assertTrue($model->load(['amount' => rand(1, 200), 'paymentMethodToken' => $customer->paymentMethods()[0]->token], ''));
     $this->assertNotFalse($model->send());
 }
コード例 #2
0
 public function testSearchSubscription()
 {
     $model = new BraintreeForm();
     $this->assertInstanceOf('Braintree\\ResourceCollection', $model->searchSubscription());
 }