PayServices
 


Developers


The below JavaScript commands are only supported while using the PayServices Browser.

Command: PSBdoGetListCardReaders();

Get the list of connected card readers.



Return command: callPSBdoGetListCardReaders();

Returns and array of readers where the array key contains the name of the reader. For example: [0] => "IC Reader", [1] => "NFC Reader", [2] => "...". The array key i.e. "1" is later used in subsequent commands to specify which reader.
Command: PSBdoCheckCardReaderConnected(readerID);

Know if a compatible card reader is currently connected.
In the function it is possible to pass the readerID which is the array key returned in PSBdoGetListCardReaders(); If no readerID parameter, the system will default to the key 0.

readerID:   

Return command: callPSBdoCheckCardReaderConnected();

Returns "true" or "false"
Command: PSBdoCheckCardIsInserted(readerID);

Know if a card is currently inserted in the compatible card reader.

readerID:   

Return command: callPSBdoCheckCardIsInserted();

Returns "true" or "false"
Command: PSBdoCheckCardType(readerID);

Gather the type of card currently inserted in the compatible card reader.

readerID:   

Return command: callPSBdoCheckCardType();

Returns "false" if no reader/card present.
Returns the card type if present such as:
PAYSERVICES / BEID / MASTERCARD / VISA / AMEX / DISCOVER / DINERS / ...
Command: PSBdoGetCardDetails(readerID);

Gather the card details of the card currently inserted in the compatible card reader.

readerID:   

Return command: callPSBdoGetCardDetails();

The response will be an array containing the card's data in json format
Capture PayServices Token

The idea here is that if an input text with id="payservicesToken" is detected on the webpage, the browser inserts in that input text (which will normally be hidden on the page type="hidden") a temporary token for the session.

PSBdoPrintURL(url);

Open print dialog after downloading content from the url.

url:   
Return command: callPSBdoPrintURL();

Returns "true" or "false"


© PayServices 2021. All rights reserved  • Terms of Service  | Privacy Policy  | Copyright Policy