接口文档url:https://open.unionpay.com/tjweb/api/dictionary?apiSvcId=453
1.使用composer,"lokielse/omnipay-unionpay": "dev-master",进行单条更新。
2.上代码
$omnipay = Omnipay\Omnipay::create('UnionPay_Express');
$omnipay->setMerId('商户号');
$omnipay>setCertPath('../cert/privatekey.pfx');
$gateway->setCertPassword('000000');
$gateway->setReturnUrl('https://xxxx.com/payment/callback/returnCallback');
$gateway->setNotifyUrl('https://xxxx.com/payment/callback/notifyCallback');
$gateway->setEnvironment('production');
$order = [
'orderId' => date('YmdHis'),
'txnTime' => date('YmdHis'