Closed khanhnam99 closed 4 years ago
Làm thế nào test cho môi trường sanbox với VNPay $gateway = Omnipay::create('VNPay'); $gateway->initialize([ 'vnp_TmnCode' => '', 'vnp_HashSecret' => '', ]);
$response = $gateway->purchase([ 'vnp_TxnRef' => time(), 'vnp_OrderType' => 100000, 'vnp_OrderInfo' => time(), 'vnp_IpAddr' => '127.0.0.1', 'vnp_Amount' => 1000000, 'vnp_ReturnUrl' => 'https://github.com/phpviet', ])->send();
Thấy trong PurchaseRequest có class PurchaseRequest extends AbstractSignatureRequest{
protected $productionEndpoint = 'https://pay.vnpay.vn/vpcpay.html'; protected $testEndpoint = 'http://sandbox.vnpayment.vn/paymentv2/vpcpay.html';
$gateway = Omnipay::create('VNPay'); $gateway->initialize([ ..... 'testMode' => true ]);
thanks
Làm thế nào test cho môi trường sanbox với VNPay $gateway = Omnipay::create('VNPay'); $gateway->initialize([ 'vnp_TmnCode' => '', 'vnp_HashSecret' => '', ]);
Thấy trong PurchaseRequest có class PurchaseRequest extends AbstractSignatureRequest{