File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 22
33namespace Omnipay \NewebPay \Message ;
44
5+ use Omnipay \Common \Exception \InvalidRequestException ;
56use Omnipay \Common \Exception \InvalidResponseException ;
67use Omnipay \NewebPay \Traits \HasDefaults ;
78
@@ -10,14 +11,14 @@ class CompletePurchaseRequest extends AbstractRequest
1011 use HasDefaults;
1112
1213 /**
13- * @throws InvalidResponseException
14+ * @throws InvalidRequestException
1415 */
1516 public function getData ()
1617 {
1718 $ data = $ this ->httpRequest ->request ->all ();
1819 $ tradeSha = $ this ->tradeSha ($ data ['TradeInfo ' ]);
1920 if (! hash_equals ($ tradeSha , $ data ['TradeSha ' ])) {
20- throw new InvalidResponseException ('Incorrect TradeSha ' );
21+ throw new InvalidRequestException ('Incorrect TradeSha ' );
2122 }
2223
2324 return $ this ->decodeResponse ($ this ->decrypt ($ data ['TradeInfo ' ]));
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ public function getData()
6363 ], http_build_query ($ postData ));
6464
6565 $ decode = $ this ->decodeResponse ($ response );
66-
6766 if (! hash_equals ($ decode ['CheckCode ' ], $ this ->checkCode ($ decode ))) {
6867 throw new InvalidResponseException ('Incorrect CheckCode ' );
6968 }
Original file line number Diff line number Diff line change 22
33namespace Omnipay \NewebPay \Message ;
44
5+ use Omnipay \Common \Exception \InvalidRequestException ;
56use Omnipay \Common \Exception \InvalidResponseException ;
67use Omnipay \NewebPay \Traits \HasDefaults ;
78
@@ -10,14 +11,14 @@ class GetPaymentInfoRequest extends AbstractRequest
1011 use HasDefaults;
1112
1213 /**
13- * @throws InvalidResponseException
14+ * @throws InvalidRequestException
1415 */
1516 public function getData ()
1617 {
1718 $ data = $ this ->httpRequest ->request ->all ();
1819 $ tradeSha = $ this ->tradeSha ($ data ['TradeInfo ' ]);
1920 if (! hash_equals ($ tradeSha , $ data ['TradeSha ' ])) {
20- throw new InvalidResponseException ('Incorrect TradeSha ' );
21+ throw new InvalidRequestException ('Incorrect TradeSha ' );
2122 }
2223
2324 return $ this ->decodeResponse ($ this ->decrypt ($ data ['TradeInfo ' ]));
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ public function getData()
8383 ]));
8484
8585 $ decode = $ this ->decodeResponse ($ response );
86-
8786 if (! hash_equals ($ decode ['CheckCode ' ], $ this ->checkCode ($ decode ))) {
8887 throw new InvalidResponseException ('Incorrect CheckCode ' );
8988 }
You can’t perform that action at this time.
0 commit comments