nonDefaultMerchantAccountId() public static method

public static nonDefaultMerchantAccountId ( )
 public function testSearch_merchantAccountId()
 {
     $creditCard = SubscriptionHelper::createCreditCard();
     $triallessPlan = SubscriptionHelper::triallessPlan();
     $rand_id = strval(rand());
     $subscription_1 = Braintree\Subscription::create(['paymentMethodToken' => $creditCard->token, 'planId' => $triallessPlan['id'], 'id' => strval(rand()) . '_subscription_' . $rand_id, 'price' => '2'])->subscription;
     $subscription_2 = Braintree\Subscription::create(['paymentMethodToken' => $creditCard->token, 'planId' => $triallessPlan['id'], 'id' => strval(rand()) . '_subscription_' . $rand_id, 'merchantAccountId' => Test\Helper::nonDefaultMerchantAccountId(), 'price' => '2'])->subscription;
     $collection = Braintree\Subscription::search([Braintree\SubscriptionSearch::id()->endsWith('subscription_' . $rand_id), Braintree\SubscriptionSearch::merchantAccountId()->in([Test\Helper::nonDefaultMerchantAccountId()]), Braintree\SubscriptionSearch::price()->is('2')]);
     $this->assertFalse(Test\Helper::includes($collection, $subscription_1));
     $this->assertTrue(Test\Helper::includes($collection, $subscription_2));
 }
 public function testUpdate_withCardVerificationAndSpecificMerchantAccount()
 {
     $customer = Braintree\Customer::createNoValidate();
     $initialCreditCard = Braintree\CreditCard::create(array('customerId' => $customer->id, 'number' => '5105105105105100', 'expirationDate' => '05/12'))->creditCard;
     $result = Braintree\CreditCard::update($initialCreditCard->token, array('billingAddress' => array('region' => 'IL'), 'options' => array('verificationMerchantAccountId' => Test\Helper::nonDefaultMerchantAccountId(), 'verifyCard' => true)));
     $this->assertFalse($result->success);
     $this->assertEquals(Braintree\Result\CreditCardVerification::PROCESSOR_DECLINED, $result->creditCardVerification->status);
     $this->assertEquals(Test\Helper::nonDefaultMerchantAccountId(), $result->creditCardVerification->merchantAccountId);
 }
 public function testCreate_respectsVerifyCardAndVerificationMerchantAccountIdWhenIncludedOutsideOfTheNonce()
 {
     $http = new HttpClientApi(Braintree\Configuration::$global);
     $nonce = $http->nonce_for_new_card(['credit_card' => ['number' => '4000111111111115', 'expirationMonth' => '11', 'expirationYear' => '2099']]);
     $customer = Braintree\Customer::createNoValidate();
     $result = Braintree\PaymentMethod::create(['paymentMethodNonce' => $nonce, 'customerId' => $customer->id, 'options' => ['verifyCard' => 'true', 'verificationMerchantAccountId' => Test\Helper::nonDefaultMerchantAccountId()]]);
     $this->assertFalse($result->success);
     $this->assertEquals(Braintree\Result\CreditCardVerification::PROCESSOR_DECLINED, $result->creditCardVerification->status);
     $this->assertEquals('2000', $result->creditCardVerification->processorResponseCode);
     $this->assertEquals('Do Not Honor', $result->creditCardVerification->processorResponseText);
     $this->assertEquals(Test\Helper::nonDefaultMerchantAccountId(), $result->creditCardVerification->merchantAccountId);
 }
 public function testCreate_canSetTheMerchantAccountId()
 {
     $creditCard = SubscriptionHelper::createCreditCard();
     $plan = SubscriptionHelper::triallessPlan();
     $result = Braintree\Subscription::create(['paymentMethodToken' => $creditCard->token, 'planId' => $plan['id'], 'merchantAccountId' => Test\Helper::nonDefaultMerchantAccountId()]);
     $this->assertTrue($result->success);
     $subscription = $result->subscription;
     $this->assertEquals(Test\Helper::nonDefaultMerchantAccountId(), $subscription->merchantAccountId);
 }
 public function testCreate_withCreditCardAndSpecificVerificationMerchantAccount()
 {
     $result = Braintree\Customer::create(['firstName' => 'Mike', 'lastName' => 'Jones', 'company' => 'Jones Co.', 'email' => '*****@*****.**', 'phone' => '419.555.1234', 'fax' => '419.555.1235', 'website' => 'http://example.com', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12', 'cvv' => '123', 'cardholderName' => 'Mike Jones', 'options' => ['verificationMerchantAccountId' => Test\Helper::nonDefaultMerchantAccountId(), 'verifyCard' => true]]]);
     Test\Helper::assertPrintable($result);
     $this->assertFalse($result->success);
     $this->assertEquals(Braintree\Result\CreditCardVerification::PROCESSOR_DECLINED, $result->creditCardVerification->status);
     $this->assertEquals('2000', $result->creditCardVerification->processorResponseCode);
     $this->assertEquals('Do Not Honor', $result->creditCardVerification->processorResponseText);
     $this->assertEquals('M', $result->creditCardVerification->cvvResponseCode);
     $this->assertEquals(null, $result->creditCardVerification->avsErrorResponseCode);
     $this->assertEquals('I', $result->creditCardVerification->avsPostalCodeResponseCode);
     $this->assertEquals('I', $result->creditCardVerification->avsStreetAddressResponseCode);
 }
 public function testSubmitForRelease_fromEscrowFailsForTransactionsNotHeldInEscrow()
 {
     $result = Braintree\Transaction::sale(['merchantAccountId' => Test\Helper::nonDefaultMerchantAccountId(), 'amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12']]);
     $result = Braintree\Transaction::releaseFromEscrow($result->transaction->id);
     $this->assertFalse($result->success);
     $errors = $result->errors->forKey('transaction')->onAttribute('base');
     $this->assertEquals(Braintree\Error\Codes::TRANSACTION_CANNOT_RELEASE_FROM_ESCROW, $errors[0]->code);
 }