November 2018
Intermediate to advanced
528 pages
13h 21m
English
The buyer makes a payment for the goods. In this step, we define the BuyerDepositPayment transaction and related event and update the LC status:
transaction BuyerDepositPayment { --> LetterOfCredit lc}event BuyerDepositPaymentEvent { --> LetterOfCredit lc}
The letter status is set to BUYER_DEBIT_PAYMENT, and the step to 7:
/** * buyer Deposit Payment * @param {org.example.lc.BuyerDepositPayment} buyerDepositPayment - buyer Deposit Payment * @transaction */async function buyerDepositPayment(request) { // eslint-disable-line no-unused-vars const factory = getFactory(); const namespace = 'org.example.lc'; let letter = request.lc; if (letter.status === 'CLOSED') { throw new Error ('This letter of credit has already been closed'); ...Read now
Unlock full access