-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from tutugreen/Archive_For_JSJAPP_2018-09-28
作为历史版本,修正一些细小的偏差。
- Loading branch information
Showing
6 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* | ||
*/ | ||
|
@@ -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']}"> | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* | ||
*/ | ||
|
@@ -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.--> | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* | ||
*/ | ||
|
@@ -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.--> | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* | ||
*/ | ||
|
@@ -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 | ||
|
@@ -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'){ | ||
//回调地址 | ||
/******************************************** | ||
这里会传过来几个参数 分别为: | ||
|
@@ -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; | ||
} | ||
} | ||
} | ||
|