Skip Navigation

com.sabre.redapp.example3.desktop.linkpayment Sample

It allows you to open Link Payment form and add one of three form of payments (cash, check, credit card) to the PNR. Credit cards are validated before beeing added to the PNR.

Modal with link payment form
Modal with link payment form with choosen credit card

In case of empty PNR, not added travellers or travellers not linked to price quotes proper modal with error communicate pops up.

Modal with error message
Modal with error message

After form is submitted, callback function can be passed as an argument. It may communicate through Command Flow with given service, i.e. Validations, checks and so.

Usage

showLinkPaymentModal(isFullAmount, this.afterLinkPaymentSubmit)

Returns depending on results one of values:

'success' : when link payment modal is succesfully opened

'no-travellers-linked' : when travelers are not linked to price quotes

'no-travellers': when travellers are not added

displays link payment form and after submit is clicked afterLinkPaymentSubmit can be called.

afterLinkPaymentSubmit(): void {
        const commandMessageRq: CommandMessageRq = {
            rq: 'NGV://REDAPP/SERVICE/COM.SABRE.REDAPP.EXAMPLE3.DESKTOP.LINKPAYMENT.SERVICE.LINKPAYMENTSAMPLESERVICE:EXECUTE',
            showRq: false
        };

        getService(ICommandMessageService).send(commandMessageRq);
    }