Methods
(static) this.addPeripheral(deviceType, deviceSerial, errorFunction) → {PaymentEngineBuilder}
Set a peripheral for PaymentEngine to use to process payment.
Parameters:
| Name | Type | Description |
|---|---|---|
deviceType |
Peripherals | The device type to use. Use one of QPay.Peripherals |
deviceSerial |
string | The serial of the device. If the device has a lightning connector (QPC150, QPC250), then pass null to deviceSerial |
errorFunction |
function | Any error will be passed in here. |
- Source:
Returns:
- The PaymentEngineBuilder object for fluent access.
- Type
- PaymentEngineBuilder
(static) this.build(successFunction, errorFunction)
Builds the PaymentEngine instance with all of the specified options and the specified handler. Callback will receive the instance when completed.
Parameters:
| Name | Type | Description |
|---|---|---|
successFunction |
function | Notify when PaymentEngineBuilder successfully create the PaymentEngine |
errorFunction |
function | Any error will be passed in here. |
- Source:
(static) this.emvApplicationSelectionStrategy(strategy, errorFunction) → {PaymentEngineBuilder}
Represents a strategy to use when the presented card supports multiple EMV applications
and the peripheral is not able to automatically decide
which EMV application should be used to continue processing the presented payment card.
Parameters:
| Name | Type | Description |
|---|---|---|
strategy |
EmvApplicationSelectionStrategy | |
errorFunction |
function | Any error will be passed in here. |
- Source:
Returns:
- The PaymentEngineBuilder object for fluent access.
- Type
- PaymentEngineBuilder
(static) this.server(environment, errorFunction) → {PaymentEngineBuilder}
Set a server environment that is suitable for the workflow
Parameters:
| Name | Type | Description |
|---|---|---|
environment |
ServerEnvironments | one of QBrowser.QPay.ServerEnvironments |
errorFunction |
function | Any error will be passed in here. |
- Source:
Returns:
- The PaymentEngineBuilder object for fluent access.
- Type
- PaymentEngineBuilder
(static) this.storeAndForward(mode, autoUploadInterval, errorFunction) → {PaymentEngineBuilder}
Determine if transactions should be process online or offline mode.
Parameters:
| Name | Type | Description |
|---|---|---|
mode |
StoreAndForwardMode | The mode to use for submitting transactions to the server. One of QBrowser.QPay.StoreAndForwardMode |
autoUploadInterval |
number | The time interval to use between batch uploads to the server when online. |
errorFunction |
function | Any error will be passed in here. |
- Source:
Returns:
- The PaymentEngineBuilder object for fluent access.
- Type
- PaymentEngineBuilder
(static) this.transactionTimeout(timeout, errorFunction) → {PaymentEngineBuilder}
Set a timeout for transaction if a payment card is not presented within the time allowed, the transaction will fail.
Parameters:
| Name | Type | Description |
|---|---|---|
timeout |
number | |
errorFunction |
function |
- Source:
Returns:
- The PaymentEngineBuilder object for fluent access.
- Type
- PaymentEngineBuilder