我开发了计费项目.我要实现刷卡读卡器.我不知道使用VB + winforms的刷卡读卡器应用程序
有人能帮我吗 !!
提供样本和教程等......
我正在使用测试卡,这是我刷卡后的输出,没关系

但是,当我试图获取刷过的数据提示它到消息框时,这将是输出

我怎样才能解决这个问题?我期望输出与第一张图像相同,它也将是消息框的消息
这是我的代码:
private void CreditCardProcessor_Load(object sender, EventArgs e)
{
KeyPreview = true;
KeyPress += CreditCardProcessor_KeyPress;
}
private bool inputToLabel = true;
private void CreditCardProcessor_KeyPress(object sender, KeyPressEventArgs e)
{
if (inputToLabel)
{
label13.Text = label13.Text + e.KeyChar;
e.Handled = true;
}
else
{
e.Handled = false;
}
MessageBox.Show(label13.Text);
}
Run Code Online (Sandbox Code Playgroud)
简而言之,我想在刷卡后运行一个功能,并使用其数据在我的功能中使用.:)
我正在使用Luhn的算法进行信用卡验证:我只需要查看该号码是否是有效的信用卡号码.
$number=clean($_GET['number']);
if (LuhnCheck($number) == 0)
{
echo "credit card valid";
}
else
{
echo "invalid";
}
function LuhnCheck($strDigits)
{
$sum = 0;
$alt = false;
for($i = strlen($strDigits) - 1; $i >= 0; $i--)
{
if($alt)
{
$temp = $strDigits[$i];
$temp *= 2;
$strDigits[$i] = ($temp > 9) ? $temp = $temp - 9 : $temp;
}
$sum += $strDigits[$i];
$alt = !$alt;
}
return $sum % 10 == 0;
}
Run Code Online (Sandbox Code Playgroud)
以上是AMEX,发现,签证和万事达卡的工作吗?我无法证实.
我是这个话题的新手,所以我不知道在我的java应用程序中使用visa和master卡等信用卡接受付款需要什么。还请给我我应该用java编写的代码来完成这个任务。