【发布时间】:2015-12-30 11:26:11
【问题描述】:
大家好,我有一个问题。如果我想通过手机支付,我找不到关于如何编写支付接口的好文档。这是场景 客户将商品添加到购物车 客户选择通过移动支付选项 客户遵循指示 发送现金到商店号码 客户在网站上输入作为收据收到的代码 付款确认
我已经完成了 PHP 脚本,但我无法将其转换为 cs 购物车结构
这是脚本
<?php
set_include_path("../mall/include:" get_include_path());
require_once("PLUSPEOPLE/autoload.php");
$pesa=new PLUSPEOPLE\PesaPi\PesaPi();
if (isset($_POST["receipt"]){
$transactions=$pesa->locateByReceipt($_POST["receipt"]);
if(count($transactions)>0){
echo"Pay Recieved";
?>
<?php }
else{
?>
<html>
<head></head>
<body>
Pay not recieved Re Enter the Transaction Receipt<br>
<form method="post" action="buy.php">
<input type="text" name="receipt" value="">
<input type="submit" name="ok" value="Send Receipt">
</form>
</body>
</html>
<?php
} else{
?>
<html>
<head></head>
<body>
Please Pay this Amount<br>
<form method="post" action="buy.php">
<input type="text" name="receipt" value="">
<input type="submit" name="ok" value="Send Receipt">
</form>
</body>
</html>
<?php
}
}
?>
请帮忙
【问题讨论】:
标签: php payment-processing cs-cart