/** * @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()); }
public function testSearchSubscription() { $model = new BraintreeForm(); $this->assertInstanceOf('Braintree\\ResourceCollection', $model->searchSubscription()); }