Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPUB-1993 - Add overrideTransactionPreparation on ITransactionListener #855

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ default boolean isTransactionPreparationApproved(ITransactionPreparation prepara
return true;
}

/**
* Allows the operator to override values in {@link ITransactionPreparation}.
* Operators can change the crypto address format, transaction limits, allow/disallow discount codes for the current transaction etc.
* 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