Пример #1
0
 public function testCreate_with_invalid_venmoSdkPaymentMethodCode()
 {
     $customer = Braintree\Customer::createNoValidate();
     $result = Braintree\CreditCard::create(array('customerId' => $customer->id, 'venmoSdkPaymentMethodCode' => Braintree\Test\VenmoSdk::getInvalidPaymentMethodCode()));
     $this->assertFalse($result->success);
     $errors = $result->errors->forKey('creditCard')->onAttribute('venmoSdkPaymentMethodCode');
     $this->assertEquals($errors[0]->code, Braintree\Error\Codes::CREDIT_CARD_INVALID_VENMO_SDK_PAYMENT_METHOD_CODE);
 }