Created
August 17, 2019 21:53
-
-
Save brenden-t-r/56af8a9ccd48c784d596015959c1746e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class CustomMakeOffLedgerPayment<T: TokenType>( | |
val amount: Amount<T>, | |
private val obligationStateAndRef: StateAndRef<Obligation<*>>, | |
open val settlementMethod: OffLedgerPayment<*>, | |
override val progressTracker: ProgressTracker = MakeOffLedgerPayment.tracker() | |
): MakeOffLedgerPayment<T>(amount, obligationStateAndRef, settlementMethod, progressTracker) { | |
@Suspendable | |
override fun setup() { | |
// Perform any setup tasks needed for your payment rail | |
} | |
@Suspendable | |
override fun checkBalance(requiredAmount: Amount<*>) { | |
// Use CordaService API to check balances and verify funds exist. | |
} | |
@Suspendable | |
override fun makePayment(obligation: Obligation<*>, amount: Amount<T>): Payment<T> { | |
// Initiate payment on off-ledger payment rail | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment