TransferResult.php 639 B

1234567891011121314151617181920
  1. <?php
  2. namespace addon\wechatpay\event;
  3. use addon\wechatpay\model\Config;
  4. use addon\wechatpay\model\V3;
  5. use app\model\member\Withdraw;
  6. class TransferResult
  7. {
  8. public function handle(array $params)
  9. {
  10. $withdraw_info = (new Withdraw())->getMemberWithdrawInfo([ ['id','=', $params['relate_id']] ], 'id,site_id,applet_type,withdraw_no')['data'];
  11. if (!empty($withdraw_info)) {
  12. $pay_config = (new Config())->getPayConfig($withdraw_info['site_id'])['data']['value'];
  13. if (!empty($pay_config)) {
  14. (new V3($pay_config))->getTransferResult($withdraw_info);
  15. }
  16. }
  17. }
  18. }