1
This commit is contained in:
parent
b5c0c9dd6b
commit
0b3f582982
@ -102,7 +102,26 @@ class UnifiedWeiXin extends BaseSdk {
|
||||
|
||||
public function payNotify()
|
||||
{
|
||||
|
||||
$raw_data = file_get_contents('php://input');
|
||||
$xml = new \SimpleXMLElement($raw_data);
|
||||
if ($xml->return_code == 'SUCCESS') {
|
||||
$this->spPayConfirm(
|
||||
$xml->out_trade_no,
|
||||
$xml->transaction_id,
|
||||
$xml->total_fee
|
||||
);
|
||||
$data = array(
|
||||
'return_code' => 'SUCCESS',
|
||||
'return_msg' => 'OK'
|
||||
);
|
||||
echo phpcommon\objectToXml($params);
|
||||
} else {
|
||||
$data = array(
|
||||
'return_code' => 'FAIL',
|
||||
'return_msg' => '交易失败'
|
||||
);
|
||||
echo phpcommon\objectToXml($params);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user