Browse Source

ali pay notify bug fix

fly 5 năm trước cách đây
mục cha
commit
fc4ac7dcee
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Libs/Pay/Merchants/AliPay.php

+ 1 - 1
app/Libs/Pay/Merchants/AliPay.php

@@ -79,7 +79,7 @@ class AliPay implements PayMerchantInterface
 
     public function notify(array $data)
     {
-        if (isset($data['sign'])) {
+        if (isset($data['sign']) && isset($data['trade_status'])  && $data['trade_status'] == 'TRADE_SUCCESS') {
             return $this->aop->rsaCheckV1($data, $this->rsaPublicKeyFilePath, self::SIGN_TYPE);
         } else {
             return false;