nonDefaultSubMerchantAccountId() public static method

public static nonDefaultSubMerchantAccountId ( )
コード例 #1
0
 public function testCreateTransactionWithServiceFeesFromTransparentRedirect()
 {
     $params = array('transaction' => array('customer' => array('first_name' => 'First'), 'credit_card' => array('number' => '5105105105105100', 'expiration_date' => '05/12'), 'service_fee_amount' => '1.00', 'merchant_account_id' => Test\Helper::nonDefaultSubMerchantAccountId()));
     $trParams = array('transaction' => array('type' => Braintree\Transaction::SALE, 'amount' => '100.00'));
     $trData = Braintree\TransparentRedirect::transactionData(array_merge($trParams, array("redirectUrl" => "http://www.example.com")));
     $queryString = Test\Helper::submitTrRequest(Braintree\TransparentRedirect::url(), $params, $trData);
     $result = Braintree\TransparentRedirect::confirm($queryString);
     $this->assertTrue($result->success);
     $this->assertEquals('1.00', $result->transaction->serviceFeeAmount);
 }
コード例 #2
0
 public function createEscrowedTransaction()
 {
     $result = Braintree\Transaction::sale(['merchantAccountId' => Test\Helper::nonDefaultSubMerchantAccountId(), 'amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12'], 'options' => ['holdInEscrow' => true], 'serviceFeeAmount' => '1.00']);
     Test\Helper::escrow($result->transaction->id);
     return $result->transaction;
 }