Skip to content

Commit

Permalink
Changed the Braintree VOIDED status to be mapped as CANCELLED ins…
Browse files Browse the repository at this point in the history
…tead of `DECLINED`
  • Loading branch information
fulopattila122 committed May 7, 2023
1 parent 9d9bbc2 commit 3c46a1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Vanilo Braintree Module Changelog

## Unreleased
##### 2023-XX-YY

- Changed the Braintree `VOIDED` status to be mapped as `CANCELLED` instead of `DECLINED`

## 1.5.1
##### 2023-05-04

Expand Down
5 changes: 4 additions & 1 deletion src/Messages/BraintreePaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ private function resolveStatus()
case BraintreeTransactionStatus::FAILED:
case BraintreeTransactionStatus::GATEWAY_REJECTED:
case BraintreeTransactionStatus::PROCESSOR_DECLINED:
case BraintreeTransactionStatus::VOIDED:
$this->status = PaymentStatusProxy::DECLINED();
$this->wasSuccessful = false;
break;
case BraintreeTransactionStatus::VOIDED:
$this->status = PaymentStatusProxy::CANCELLED();
$this->wasSuccessful = false;
break;
case BraintreeTransactionStatus::SETTLED:
$this->status = PaymentStatusProxy::PAID();
$this->wasSuccessful = true;
Expand Down

0 comments on commit 3c46a1b

Please sign in to comment.