4

I'm following documentation for testing Braintree settlement status: https://developers.braintreepayments.com/reference/general/testing/php#settlement-status

Doc says:

$result = Braintree_Test_Transaction::settle($sale_result->transaction->id);
$result->success
# true

$result->transaction->status
# Braintree_Transaction::SETTLED

I was testing with VISA card.

So expected result is transaction status "settled" (Braintree_Transaction::SETTLED).

Actual result is transaction status "settling" (Braintree_Transaction::SETTLING)

It's not a big deal but still I would be expecting SETTLED as stated in the documentation.

Anyone having same experience testing \Braintree\Test\Transaction::settle($transactionId) ?

Petr Urban
  • 298
  • 2
  • 13

1 Answers1

3

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.

While I can't personally recreate this behavior, I could imagine the gateway returning SETTLING rather than blocking until the settlement completes. Once the settle() call has returned, you can call

Braintree\Transaction::find($sale_result->transaction->id)

and inspect the status of that transaction response object to see if the settlement has been completed.

jellenberger
  • 506
  • 2
  • 9
  • I did check the transaction afterwards (on sandbox website as well as using Braintree\Transaction::find method) - it is "settling". Today when I call \Braintree\Test\Transaction::settle($transactionId) on transaction with status "submitted_for_settlement" I get back error from braintree sandbox - 91575 Cannot transition transaction to settled, settlement_confirmed, or settlement_declined. (debug shows braintree library does PUT request /merchants/***/transactions/***/settle) Maybe there's something with the sandbox at the moment - I will get back to it in a week or so and re-test. – Petr Urban Aug 19 '16 at 09:20