|
@@ -0,0 +1,42 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\common\service;
|
|
|
+
|
|
|
+class MoneyService
|
|
|
+{
|
|
|
+ private $model = '';
|
|
|
+
|
|
|
+
|
|
|
+ * 初始化方法
|
|
|
+ */
|
|
|
+ public function __construct()
|
|
|
+ {
|
|
|
+ $this->model = new \app\common\model\User();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function withdrawTransfer() {
|
|
|
+ $info = [
|
|
|
+ 'money' => 0.10,
|
|
|
+ 'alipay_account' => '13651955934',
|
|
|
+ 'name' => '张效彬',
|
|
|
+ ];
|
|
|
+ $data['out_biz_no'] = getMillisecond() . mt_rand(1, 1000);
|
|
|
+ $data['trans_amount'] = $info['money'];
|
|
|
+ $data['product_code'] = 'TRANS_ACCOUNT_NO_PWD';
|
|
|
+ $data['biz_scene'] = 'DIRECT_TRANSFER';
|
|
|
+ $data['order_title'] = 'GG语音提现';
|
|
|
+
|
|
|
+ $data['payee_info'] = [
|
|
|
+ 'identity' => $info['alipay_account'],
|
|
|
+ 'identity_type' => 'ALIPAY_LOGON_ID',
|
|
|
+ 'name' => $info['name'],
|
|
|
+ ];
|
|
|
+
|
|
|
+ $data['remark'] = 'GG语音提现';
|
|
|
+ require_once("../extend/AliPay/AliPay.php");
|
|
|
+ $alipay =new \AliPay();
|
|
|
+ $result =$alipay->AliPayWithdraw($data);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+}
|