public function __construct($notify_url = null, $data = []) { if (!$notify_url) { $notify_url = Url::host() . '/pay/callback/wx_js'; } $this->notify_url = $notify_url; $this->data = array_merge($this->data, $data); }