File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 22
33namespace Omnipay \YiPay \Message ;
44
5- use Omnipay \Common \Exception \InvalidResponseException ;
5+ use Omnipay \Common \Exception \InvalidRequestException ;
66use Omnipay \YiPay \Traits \HasYiPay ;
77
88class CompletePurchaseRequest extends PurchaseRequest
99{
1010 use HasYiPay;
1111
1212 /**
13- * @throws InvalidResponseException
13+ * @throws InvalidRequestException
1414 */
1515 public function getData ()
1616 {
@@ -21,12 +21,11 @@ public function getData()
2121 if (array_key_exists ('transactionNo ' , $ data )) {
2222 $ checkCode = $ this ->checkCode ($ this ->getSignedKeys ((int ) $ data ['type ' ]), $ data );
2323
24- if (! hash_equals ($ checkCode , $ data ['checkCode ' ])) {
25- throw new InvalidResponseException ( ' Invalid check code ' );
24+ if (! hash_equals ($ checkCode , $ data ['checkCode ' ] ?: '' )) {
25+ throw new InvalidRequestException ( ' Incorrect checkCode ' );
2626 }
2727 }
2828
29-
3029 return $ data ;
3130 }
3231
You can’t perform that action at this time.
0 commit comments