예제 #1
0
        public static QrInfo InitializeDefault(this QrInfo qr, bool staticQr = true, CurrencyCode currency = CurrencyCode.THB, string country = "TH")
        {
            var PointOfInitiationMethod = staticQr ? emv.Static : emv.Dynamic;

            qr.Segments.Add(new QrDataObject("000201"));
            qr.Segments.Add(new QrDataObject($"0102{PointOfInitiationMethod}"));
            qr.Segments.Add(new QrDataObject($"5303{currency.GetCode()}"));
            qr.Segments.Add(new QrDataObject($"5802{country}"));
            return(qr);
        }
예제 #2
0
 public QrBuilder SetCurrencyCode(CurrencyCode code)
 => Add(QrIdentifier.TransactionCurrency, code.GetCode());