File tree Expand file tree Collapse file tree 2 files changed +2
-26
lines changed Expand file tree Collapse file tree 2 files changed +2
-26
lines changed Original file line number Diff line number Diff line change 1313 */
1414trait RequestEndpoint
1515{
16- /**
17- * Đường dẫn kết nối đến VTCPay để test.
18- *
19- * @var string
20- */
21- protected $ testEndPoint ;
22-
23- /**
24- * Đường dẫn kết nối đến VTCPay ở môi trường production.
25- *
26- * @var string
27- */
28- protected $ productionEndpoint ;
29-
3016 /**
3117 * Trả về url kết nối MoMo.
3218 *
3319 * @return string
3420 */
3521 protected function getEndpoint (): string
3622 {
37- return $ this ->getTestMode () ? $ this -> testEndPoint : $ this -> productionEndpoint ;
23+ return $ this ->getTestMode () ? ' http://alpha1.vtcpay.vn/portalgateway ' : ' https://vtcpay.vn/bank-gateway ' ;
3824 }
3925}
Original file line number Diff line number Diff line change @@ -17,16 +17,6 @@ class PurchaseRequest extends AbstractRequest
1717 use Concerns \RequestEndpoint;
1818 use Concerns \RequestSignature;
1919
20- /**
21- * {@inheritdoc}
22- */
23- protected $ testEndPoint = 'https://vtcpay.vn/bank-gateway/checkout.html ' ;
24-
25- /**
26- * {@inheritdoc}
27- */
28- protected $ productionEndpoint = 'http://alpha1.vtcpay.vn/portalgateway/checkout.html ' ;
29-
3020 /**
3121 * {@inheritdoc}
3222 */
@@ -59,7 +49,7 @@ public function getData(): array
5949 */
6050 public function sendData ($ data ): PurchaseResponse
6151 {
62- $ redirectUrl = $ this ->getEndpoint ().'? ' .http_build_query ($ data );
52+ $ redirectUrl = $ this ->getEndpoint ().'/checkout.html ? ' .http_build_query ($ data );
6353
6454 return $ this ->response = new PurchaseResponse ($ this , $ data , $ redirectUrl );
6555 }
You can’t perform that action at this time.
0 commit comments