Skip to content

Commit

Permalink
Merge pull request #11 from tutugreen/Archive_For_JSJAPP_2018-09-28
Browse files Browse the repository at this point in the history
作为历史版本,修正一些细小的偏差。
  • Loading branch information
tutugreen authored Oct 9, 2018
2 parents f1ab03e + 22f8ccd commit 14791fd
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion JSJApiPay/JSJApiPay.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author tutugreen ([email protected])
* @copyright Copyright (c) Tutugreen.com 2016~2018
* @license MIT
* @version 0.19-2018-06-19-01
* @version 0.20-2018-10-09-01
* @link https://github.com/tutugreen/WHMCS-JSJ-API-Pay-Gateway
*
*/
Expand Down
4 changes: 2 additions & 2 deletions JSJApiPay_Alipay_Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author tutugreen ([email protected])
* @copyright Copyright (c) Tutugreen.com 2016~2018
* @license MIT
* @version 0.19-2018-06-19-01
* @version 0.20-2018-10-09-01
* @link https://github.com/tutugreen/WHMCS-JSJ-API-Pay-Gateway
*
*/
Expand Down Expand Up @@ -106,7 +106,6 @@ function JSJApiPay_Alipay_Web_link($params) {
<!-- Loading Required JS/CSS -->
<script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- Jquery Polling Invoice & Check Result-->
<form name="JSJApiPay_Alipay_Web_form" action="{$parameter['api_url']}" method="POST">
<input type="hidden" name="addnum" value="{$parameter['addnum']}">
<input type="hidden" name="total" value="{$parameter['amount']}">
Expand All @@ -118,6 +117,7 @@ function JSJApiPay_Alipay_Web_link($params) {
<a href="#" onclick="document.forms['JSJApiPay_Alipay_Web_form'].submit();">
<img src="{$img}" alt="点击使用支付宝支付">
</a>
<!-- Jquery Polling Invoice & Check Result-->
<script>
jQuery(document).ready(function() {
var paid_status = false
Expand Down
4 changes: 2 additions & 2 deletions JSJApiPay_QQ_Pay_QRCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author tutugreen ([email protected])
* @copyright Copyright (c) Tutugreen.com 2016~2018
* @license MIT
* @version 0.19-2018-06-19-01
* @version 0.20-2018-10-09-01
* @link https://github.com/tutugreen/WHMCS-JSJ-API-Pay-Gateway
*
*/
Expand Down Expand Up @@ -155,7 +155,6 @@ function JSJApiPay_QQ_Pay_QRCode_link($params) {
<script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- Jquery Polling Invoice & Check Result-->
<div class="JSJApiPay_QQ_Pay_QRCode" style="max-width: 240px;margin: 0 auto">
{$tooltip_QRCode_info}
<!-- QRCode Should Be Display Here , Or Check Your Explorer Version.-->
Expand All @@ -173,6 +172,7 @@ function JSJApiPay_QQ_Pay_QRCode_link($params) {
<script>
$(function () { $("[data-toggle='tooltip']").tooltip({html : true }); });
</script>
<!-- Jquery Polling Invoice & Check Result-->
<script>
jQuery(document).ready(function() {
var paid_status = false
Expand Down
4 changes: 2 additions & 2 deletions JSJApiPay_WeChat_Pay_QRCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author tutugreen ([email protected])
* @copyright Copyright (c) Tutugreen.com 2016~2018
* @license MIT
* @version 0.19-2018-06-19-01
* @version 0.20-2018-10-09-01
* @link https://github.com/tutugreen/WHMCS-JSJ-API-Pay-Gateway
*
*/
Expand Down Expand Up @@ -150,7 +150,6 @@ function JSJApiPay_WeChat_Pay_QRCode_link($params) {
<script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- Jquery Polling Invoice & Check Result-->
<div class="JSJApiPay_WeChat_Pay_QRCode" style="max-width: 240px;margin: 0 auto">
{$tooltip_QRCode_info}
<!-- QRCode Should Be Display Here , Or Check Your Explorer Version.-->
Expand All @@ -168,6 +167,7 @@ function JSJApiPay_WeChat_Pay_QRCode_link($params) {
<script>
$(function () { $("[data-toggle='tooltip']").tooltip({html : true }); });
</script>
<!-- Jquery Polling Invoice & Check Result-->
<script>
jQuery(document).ready(function() {
var paid_status = false
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ N/A at now.

## 更新日志

**最近版本更新:v0.19-2018-06-19-01**
**最近版本更新:v0.20-2018-10-09-01**

2018-10-09-01:

作为历史版本,完善一些细小的偏差。

2018-06-19-01:

Expand Down
20 changes: 16 additions & 4 deletions callback/JSJApiPay_callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author tutugreen ([email protected])
* @copyright Copyright (c) Tutugreen.com 2016~2018
* @license MIT
* @version 0.19-2018-06-19-01
* @version 0.20-2018-10-09-01
* @link https://github.com/tutugreen/WHMCS-JSJ-API-Pay-Gateway
*
*/
Expand Down Expand Up @@ -52,6 +52,17 @@
echo "非法访问";
}

if ($_POST['act'] or $_GET['act']){
}else{
if ($debug) {
$act = $_POST['act'] ? $_POST['act'] : $_GET['act'];
$msg="[JSJApiPay]收到未知回调,act 变量缺失或错误";
JSJApiPay_logResult($msg);
}
$api_pay_failed = "true";
echo "非法访问";
}

if ($api_pay_failed<>"true"){
$gateway = getGatewayVariables($gatewaymodule);
if (!$gateway["type"]) die("Module Not Activated,您所请求的回调接口未启用!"); # Checks gateway module is active before accepting callback
Expand All @@ -72,9 +83,9 @@
//Start
$JSJApiPay_config['apiid'] = trim($gateway['apiid']);
$JSJApiPay_config['apikey'] = trim($gateway['apikey']);
$JSJApiPay_config['fee_acc'] = trim($GATEWAY['fee_acc']);
$JSJApiPay_config['fee_acc'] = trim($gateway['fee_acc']);

if ($_GET['act']=='return' or $_GET['act']=='bd'){
if ($act=='return' or $act=='bd'){
//回调地址
/********************************************
这里会传过来几个参数 分别为:
Expand Down Expand Up @@ -180,7 +191,8 @@
$invoiceid = checkCbInvoiceID($invoiceid,$gateway["name"]); # Checks invoice ID is a valid invoice number or ends processing
checkCbTransID($transid);
addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule);
logTransaction($GATEWAY["name"],$_POST,"Successful-A");
logTransaction($gateway["name"],$_POST,"Successful-A");
exit;
}
}
}
Expand Down

0 comments on commit 14791fd

Please sign in to comment.