Backend/Microservices/OrderInventoryService/server/src/Entity/order.js
/**
    * Method to request for Payment capture for the order.
    * @param transactionId: The transaction id.
    * @param baseAmount: The base amount of the order.
    * @param couponCode: The coupon code entered by the user.
    * @param jwToken: The token of the user.
    * @private
    */
Method to request for Payment capture for the order.
@param transactionId: The transaction id.
@param baseAmount: The base amount of the order.
@param couponCode: The coupon code entered by the user.
@param jwToken: The token of the user.
@private
Method to request for Payment capture for the order . @param transactionId : The transaction id . @param baseAmount : The base amount of the order . @param couponCode : The coupon code entered by the user . @param jwToken : The token of the user . @private
_requestPaymentCapture(transactionId, baseAmount, couponCode, jwToken) {
      const sqs = new SQSHelper(constants.SQS_ORDER_TO_PAYMENT_QUEUE_URL);
      const message = {};
      message[constants.ORDER_ID] = this._orderId;
      message[constants.TRANSACTION_ID] = transactionId;
      message[constants.BASE_AMOUNT] = baseAmount;
      message[constants.COUPON_CODE] = couponCode;
      message[constants.JW_TOKEN] = jwToken;
      sqs.sendMessage(message, this._flycastOrderId, "orderGroup" + this._orderId).then(response => {
         printer.printLog(response);
         printer.printHighlightedLog("Payment Capture request send for Order ID: " + this._orderId);
      }).catch(err => {
         printer.printError("Payment Capture request FAILED for Order ID: " + this._orderId);
         printer.printError(err);
      });
   }
_requestPaymentCapture ( transactionId , baseAmount , couponCode , jwToken ) { const sqs = new SQSHelper ( constants . SQS_ORDER_TO_PAYMENT_QUEUE_URL ) ; const message = { } ; message [ constants . ORDER_ID ] = this . _orderId ; message [ constants . TRANSACTION_ID ] = transactionId ; message [ constants . BASE_AMOUNT ] = baseAmount ; message [ constants . COUPON_CODE ] = couponCode ; message [ constants . JW_TOKEN ] = jwToken ; sqs . sendMessage ( message , this . _flycastOrderId , "orderGroup" + this . _orderId ) . then ( response => { printer . printLog ( response ) ; printer . printHighlightedLog ( "Payment Capture request send for Order ID: " + this . _orderId ) ; } ) . catch ( err => { printer . printError ( "Payment Capture request FAILED for Order ID: " + this . _orderId ) ; printer . printError ( err ) ; } ) ; }
Method to request for Payment capture for the order.
Method to request for Payment capture for the order .