作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

... ... @@ -432,12 +432,18 @@ class OrderController extends HomeBaseController
{
require EXTEND_PATH . '/alipay/config.php';
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
$arr=$_POST;
$arr = $_POST;
$alipaySevice = new AlipayTradeService($config);
$alipaySevice->writeLog(var_export($_POST,true));
if($result = $alipaySevice->check($arr)) {
Db::name('user')->where(['id'=>10])->setInc('balance', 1);
$alipaySevice->writeLog(var_export($_POST, true));
if ($result = $alipaySevice->check($arr)) {
Db::name('user')->where(['id' => 10])->setInc('balance', 1);
}
}
//支付宝同步通知
public function alipayNotifys()
{
}
}
\ No newline at end of file
... ...
... ... @@ -16,10 +16,10 @@ class AlipayTradeService {
public $gateway_url = "https://openapi.alipay.com/gateway.do";
//支付宝公钥
public $alipay_public_key = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArNEHZmEHK65rLQmuYhYpXTsWMFf3SPLfI0WNNjm6LeUBtD/3IocM/NrkOJZ3sRRCBY8qYOWvJANG6iq/Nae0Z4bmQ25qHIesnU2ev4PurT24AMEugJwG62KUrOfZo7fmjMTsyCdcCW7W0XYwYmcz6R3a6y/APENpb33kO4lls+ly3FmocitbmAVrIcbXwl6c9Oc3iaEhcbBn8iP6Leg7GeTztW2S6m1BfhBIhYuUpQ0WOkAiqCr/+oAbP3udSC3uZzjoV6o2mcqR3nm/JACq+t2RA0OZVEXQsnqpDpsD6PxMYeLoyEu+ORyK6XlOfw8Q+ARGl4ffTu7+jHUb3dkiXwIDAQAB';
public $alipay_public_key;
//商户私钥
public $private_key = 'MIIEpAIBAAKCAQEArNEHZmEHK65rLQmuYhYpXTsWMFf3SPLfI0WNNjm6LeUBtD/3IocM/NrkOJZ3sRRCBY8qYOWvJANG6iq/Nae0Z4bmQ25qHIesnU2ev4PurT24AMEugJwG62KUrOfZo7fmjMTsyCdcCW7W0XYwYmcz6R3a6y/APENpb33kO4lls+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hEbvElmQgGKnaFdQLJugUKHEGf6rwTebAK+6MoByhvhzJLQloaXhh3fCOLr0J9Qa5ddcetHjTJaRRXIgjvICZERfQBhZCYoliOWpnuqswF29p0C6wUjyf699uVeGiyrk+kHMEs4cSXDHYNaP4PuvQYqSL34/4LQKBgQCuaFmh7j+kvebUxRaDRJmuhuYarzT3Hg86P6+wl6DRZL1Bs1DYW7ydkgOhCE5XqWUI6jEsD2aJInMDPNMghGmhA474ZGp5ZwEmIItNHgkvjsHcQupPKVEUbruOzVJDEILl3TH/JjG3XtZ6yPd8dFr3gSBdspvGVUmijHMSpl/3VQ==';
public $private_key;
//应用id
public $appid = "2018101661696470";
... ...