PaymentQr class abstract final

Finds the VietQR code of a payment card.

qr_image_url points at the gateway's /pay/{id}/qr.svg, which Flutter's image codecs cannot decode. The code itself is just the EMVCo payload, so the SDK draws it: from the card's payload when it carries one, else from the public checkout JSON next to the SVG (GET /pay/{id} → qr.payload). Any other URL is fetched and used when it is a raster image.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

checkoutUrlFor(Uri imageUrl) → Uri?
The checkout JSON for an image URL of the form …/pay/{id}/qr.svg (or qr.png), else null.
isRaster(List<int> b) → bool
The bytes start like a PNG, JPEG, GIF or WebP file.
resolve(PaymentCard card, {Client? client, Duration timeout = const Duration(seconds: 15)}) → Future<PaymentQrSource>
Where to draw card's QR from: its payload, the checkout's payload, or a raster image. Uses client (a short-lived one when null); each request gives up after timeout. The requests are public (no app key or visitor token) and send only CORS-safelisted headers, so they work on the web. Throws PaymentQrException.