你好!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
function com_init(com:Integer; baud:Dword):Boolean;stdcall;external 'api_com.dll';
function com_rest:Boolean;stdcall;external 'api_com.dll';
function com_send(buf:PChar; len:Integer):Boolean;stdcall;external 'api_com.dll';
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Com_init(1,2400);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Com_rest;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
PDStr:string;
begin
PDStr:=Chr(27)+Chr(81)+Chr(65)+'1234.56'+Chr(13);
if com_send(Pchar(PDStr),Length(PDStr)) then
begin
Label1.Caption :='已经发送命令';
end
else
begin
Label1.Caption :='发送失败';
end;
PDStr:= Chr(27)+Chr(115)+'2';
if com_send(Pchar(PDStr),Length(PDStr)) then
begin
Label1.Caption :='已经发送命令';
end
else
begin
Label1.Caption :='发送失败';
end;
end;
end.
把'api_com.dll'放在程序目录就可以了。
仅代表个人观点,不喜勿喷,谢谢。
电线版的就是把传统出小票的,变为电子版。这个就是手写功能,直接在刷卡机机上面签写自己的名字,然后上传到服务器。
刷卡机刷支付宝是通过扫码来完成的。立刷电签pos或者其他品牌刷卡机想刷支付宝,需要找到机子扫码功能键,然后选择支付宝,分主扫和被扫两种。如果机子不带摄像头就选择主扫,机子会屏幕生成二维码,然后用手机支付宝扫码二维码输入密码就完成了