Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Service "paymentGateway" receive this mutation and call action “processTransaction” of service "operationspaymentGateway"

Code Block
await ctx.call('paymentGateway.processTransaction', {
  txid: String(ctx.params.documentId || new Date().getTime()), // # bank transaction or if it is Null - unix time
  amount: Number(ctx.params.amount), // deposit amount
  paymentInterfaceId: piId, // fiat payment interface ID
  currencyId: ctx.params.currencyId, // deposit currency ID
  address: ctx.params.address, // user ref No
});

...

To do this, in the payment interface it is necessary to implement the receipt of information from the bank. And if a deposit has arrived from the client, call the action processTransaction of service “operations” “paymentGateway” with parameters:

  • txid - String - original bank document ID

  • amount - Number - amount of payment

  • paymentInterfaceId - String

  • currencyId - String

  • address - String - user refNo from payment description

...