function testSettlementPending()
 {
     $transaction = Braintree_Transaction::saleNoValidate(['amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12'], 'options' => ['submitForSettlement' => true]]);
     $transaction = Braintree_Test_Transaction::settlementPending($transaction->id);
     $this->assertEquals('settlement_pending', $transaction->status);
 }
Exemplo n.º 2
0
 function testIncludeProcessorSettlementResponseForSettlementPendingTransaction()
 {
     $result = Braintree_Transaction::sale(array("paymentMethodNonce" => Braintree_Test_Nonces::$paypalFuturePayment, "amount" => "100", "options" => array("submitForSettlement" => true)));
     $this->assertTrue($result->success);
     $transaction = $result->transaction;
     Braintree_Test_Transaction::settlementPending($transaction->id);
     $inline_transaction = Braintree_Transaction::find($transaction->id);
     $this->assertEquals($inline_transaction->status, Braintree_Transaction::SETTLEMENT_PENDING);
     $this->assertEquals($inline_transaction->processorSettlementResponseCode, "4002");
     $this->assertEquals($inline_transaction->processorSettlementResponseText, "Settlement Pending");
 }