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

public static createNoValidate ( $attribs )
Пример #1
0
 public function testDelete_deletesThePaymentMethod()
 {
     $customer = Braintree\Customer::createNoValidate(array());
     $creditCard = Braintree\CreditCard::createNoValidate(array('customerId' => $customer->id, 'number' => '5105105105105100', 'expirationDate' => '05/12'));
     Braintree\CreditCard::find($creditCard->token);
     Braintree\CreditCard::delete($creditCard->token);
     $this->setExpectedException('Braintree\\Exception\\NotFound');
     Braintree\CreditCard::find($creditCard->token);
 }
Пример #2
0
 public function testUpdate_canUpdatePaymentMethodToken()
 {
     $oldCreditCard = SubscriptionHelper::createCreditCard();
     $plan = SubscriptionHelper::triallessPlan();
     $subscription = Braintree\Subscription::create(['paymentMethodToken' => $oldCreditCard->token, 'price' => '54.99', 'planId' => $plan['id']])->subscription;
     $newCreditCard = Braintree\CreditCard::createNoValidate(['number' => '5105105105105100', 'expirationDate' => '05/2010', 'customerId' => $oldCreditCard->customerId]);
     $result = Braintree\Subscription::update($subscription->id, ['paymentMethodToken' => $newCreditCard->token]);
     $this->assertTrue($result->success);
     $this->assertEquals($newCreditCard->token, $result->subscription->paymentMethodToken);
 }