Class QRCode


  • public class QRCode
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      QRCode()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static QRCode createQRCode​(java.lang.String externalId, QRCode.QRCodeType type, java.lang.String callbackUrl, java.lang.Number amount)
      Create QR Code with given parameters
      static QRCode createQRCode​(java.util.Map<java.lang.String,​java.lang.Object> params)
      Create QR Code with parameters in a HashMap
      static QRCode createQRCode​(java.util.Map<java.lang.String,​java.lang.String> headers, java.util.Map<java.lang.String,​java.lang.Object> params)
      Create QR Code with headers and parameters in a HashMap
      static QRCode getQRCode​(java.lang.String externalId)
      Get QR Code by external id
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QRCode

        public QRCode()
    • Method Detail

      • createQRCode

        public static QRCode createQRCode​(java.lang.String externalId,
                                          QRCode.QRCodeType type,
                                          java.lang.String callbackUrl,
                                          java.lang.Number amount)
                                   throws XenditException
        Create QR Code with given parameters
        Parameters:
        externalId - An ID of your choice. Often it is unique identifier in your system like customer ID or order ID
        type - DYNAMIC or STATIC. DYNAMIC QR code contains the payment value upon scanning and can be paid multiple times. STATIC QR code requires end user to input the payment value and can be paid multiple times
        callbackUrl - The URL to receive payment notification after payment has been made by end user
        amount - The payment value embedded in the QR code, end user can only pay the specified amount after scanning the QR code. For STATIC QR code, amount parameter will be ignored.
        Returns:
        QRCode
        Throws:
        XenditException - XenditException
      • createQRCode

        public static QRCode createQRCode​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                   throws XenditException
        Create QR Code with parameters in a HashMap
        Parameters:
        params - listed here https://xendit.github.io/apireference/#create-qr-code
        Returns:
        QRCode
        Throws:
        XenditException - XenditException
      • createQRCode

        public static QRCode createQRCode​(java.util.Map<java.lang.String,​java.lang.String> headers,
                                          java.util.Map<java.lang.String,​java.lang.Object> params)
                                   throws XenditException
        Create QR Code with headers and parameters in a HashMap
        Parameters:
        headers -
        params - listed here https://xendit.github.io/apireference/#create-qr-code
        Returns:
        QRCode
        Throws:
        XenditException - XenditException
      • getQRCode

        public static QRCode getQRCode​(java.lang.String externalId)
                                throws XenditException
        Get QR Code by external id
        Parameters:
        externalId - Merchant provided unique ID used to create QR code
        Returns:
        QRCode
        Throws:
        XenditException - XenditException