1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php namespace Pay\Lib;
- use Dever;
- class Test extends Core
- {
- public function __construct($config)
- {
- $this->config = $config;
- }
-
- public function notify()
- {
-
- }
-
- public function order($account_id, $project_id, $uid, $username, $product_id, $name, $cash, $openid = false, $type = 1, $order_id = false)
- {
- $order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $this->config['type'], $order_id);
- return $order_id;
- }
-
- public function qrcode($order, $refer)
- {
- return $order;
- }
-
- public function applet($order)
- {
- return $order;
- }
-
- public function page($order, $refer)
- {
- return $order;
- }
-
- public function refund($order_id, $cash)
- {
- $out_trade_no = $order_id;
- $cash = $cash * 100;
- $total_fee = $cash;
- $refund_fee = $cash;
- $input = new \WxPayRefund();
- $input->SetOut_trade_no($out_trade_no);
- $input->SetTotal_fee($total_fee);
- $input->SetRefund_fee($refund_fee);
- $input->SetOut_refund_no($out_trade_no . '_' . time());
- $input->SetOp_user_id($this->config->GetMerchantId());
- $result = \WxPayApi::refund($this->config, $input);
- return $result;
- }
- }
|