Skip to content

Commit

Permalink
BPUB-1993 - Add overrideTransactionPreparation on ITransactionListener (
Browse files Browse the repository at this point in the history
  • Loading branch information
SMaros authored Oct 23, 2023
1 parent 4776364 commit 445d533
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ default boolean isTransactionPreparationApproved(ITransactionPreparation prepara
return true;
}

/**
* Allows the operator to override following values in {@link ITransactionPreparation}.
* <ul>
* <li>cryptoAddress</li>
* <li>cashTransactionLimitWithName</li>
* <li>cashTransactionMinimum</li>
* <li>supplyTransactionLimit</li>
* <li>allowedDiscountCode</li>
* </ul>
* This method is called for both BUY and SELL transactions.
*
* @param preparation The transaction preparation details, including calculated values.
* @return {@link ITransactionPreparation} that may contain modified transaction details.
*/
default ITransactionPreparation overrideTransactionPreparation(ITransactionPreparation preparation) {
return preparation;
}

/**
* Callback method that is called by server before transaction is executed - however the cash is already inserted in machine in case of buy transaction.
* If your method returns false than transaction will not take place and will fail with error ERROR_NOT_APPROVED.
Expand Down

0 comments on commit 445d533

Please sign in to comment.