dever 4 years ago
parent
commit
d7cbd3d25f
1 changed files with 5 additions and 15 deletions
  1. 5 15
      lib/Test.php

+ 5 - 15
lib/Test.php

@@ -21,9 +21,11 @@ class Test extends Core
 	 */
 	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);
+		$order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, 'test', $order_id);
 
-		return $order_id;
+		$this->updateOrder($order_id, $cash);
+
+		return 'test';
 	}
 
 	/**
@@ -54,18 +56,6 @@ class Test extends Core
 	# 退款
 	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;
+		return true;
 	}
 }