on the FMScript you have the possibility to follow a user payment from the presentation of the service, through the payment until receipt. We will present in this section some functions that will allow you to communicate with bleutooth printer..
Add Text to Bluetooth Printer print session PrintSessionName
Signature
BluetoothPrintItemAddText(PrintSessionName : String; Text : String; PrinterMaxLineLength : Integer);
Add Image to Bluetooth Printer print session PrintSessionName
Signature
BluetoothPrintItemAddImage(PrintSessionName : String; AccountID : String; ImageID : String; ImageType(1,2,3) : String; ThumbSize(1,2,4) : String; Width : String; Height : String);
Add Barcode to Bluetooth Printer print session PrintSessionName
Signature
BluetoothPrintItemAddBarCode(PrintSessionName : String; BarCodeType : String; BarCodeHeigth : String; BarCodeWidth : String; BarCodeValue : String);
Send to Bluetooth Printer print session PrintSessionName
Signature
BluetoothPrint(PrintSessionName : String; PrinterWindowHeader : String);
var result : string;
var Seperator : string;
result := 'Recu Minesec 1234567890';
result := result +LINEBREAK+LINEBREAK+'Bill Number: 74871. Reference: 7526232-2018. For kamdze silatsa Alex christ. Paid from (237683145360). Detail: LYCEE TECHNIQUE DE TAYIM - 2nd cycle';
result := StringReplace(result,':',' ');
Seperator := '+-+';
Result := Input('Bluetooth Printing', 'Line1, Line2,Line3,Line4,Line5,Line6', 60000,
'1::Recu Minesec 1234567890::left::Print:::0:0:0' +Seperator+
'1::Bill Number 74871::left::Print:::0:0:0' +Seperator+
'1::Reference 7526232-2018::left::Print:::0:0:0' +Seperator+
'1::For kamdze silatsa Alex christ. Paid from (237683145360)::left::Print:::0:0:0' +Seperator+
'1::LYCEE TECHNIQUE DE TAYIM - 2nd cycle::left::Print:::0:0:0' +Seperator+
'1::'+NowDate+'::left::Print:::0:0:0',
'',
Seperator,
'*'); //---Header, FieldNames, FieldValues, ImageID, Seperator, ReturnValuesSeperator : String
IF Result = '00' THEN
(
Exit;
);
ArrayStrToArray('Array', result, '*');
Showmessage(Result);
BluetoothPrintItemAddText('PrintSessionName', ArrayGetValue('Array', 0));
//BluetoothPrintItemAddText('PrintSessionName', ArrayGetValue('Array', 1));
BluetoothPrintItemAddText('PrintSessionName', ' ');
BluetoothPrintItemAddText('PrintSessionName', ArrayGetValue('Array', 2));
Result := BluetoothPrint('PrintSessionName', 'Print demo');
Showmessage('Result = ' + Result);
Exit;