Contents

runIntegrationTest#

Run a simple integration test on a test deployment of the exchange and merchant: withdraw amountToWithdraw via the corebank API, spend amountToSpend at the merchant, and then exercise a refund: withdraw a second, fixed amount (18 in the currency of amountToSpend), pay 7, refund 6 of it and pay another 3. The operation waits for all involved transactions (including refreshes) to reach a final state before returning.

Request:

The request must be an IntegrationTestArgs object.

Response:

On success, the result is an empty object.

Side effects:

Performs real withdrawals, payments and a refund at the test deployment over the network.

interface IntegrationTestArgs {
  exchangeBaseUrl: string;
  corebankApiBaseUrl: string;
  merchantBaseUrl: string;
  merchantAuthToken?: string;
  amountToWithdraw: AmountString;
  amountToSpend: AmountString;
}