package com.ruoyi.common.pay.syb.service;

import com.ruoyi.common.core.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/syb")
public class ApiTestV2 extends BaseController {

	@Autowired
	private SybPayClient service;

//	@GetMapping("/scanPay")
//	public AjaxResult testScanPay() throws Exception {
//		// TODO Auto-generated method stub
//		String reqsn = String.valueOf(System.currentTimeMillis());
//		Map<String, String> map = service.scanPay(1, reqsn, "标题", "备注", "134775931316089668", "", "", "", "");
//		return success(map);
//	}
//
//	@GetMapping("/query")
//	public AjaxResult testQuery(@RequestParam String trxid) throws Exception {
//		Map<String, String> map = service.query("", trxid);
//		return success(map);
//	}
//
//	@PostMapping("/refund")
//	public AjaxResult testRefund(@RequestParam String sn,@RequestParam  Integer amount) throws Exception {
//		Map<String, String> map = service.refund(amount, null, "",  sn);
//		return success(map);
//	}
//
//	@PostMapping("/cancel")
//	public AjaxResult testCancel() throws Exception {
//		String reqsn = String.valueOf(System.currentTimeMillis());
//		Map<String, String> map = service.cancel(1, reqsn, "112094120001088316", "");
//		return success(map);
//	}
//
//	@PostMapping("/close")
//	public AjaxResult close(@RequestParam String id, @RequestParam String sn) throws Exception {
//		Map<String, String> map = service.close(id, sn);
//		return success(map);
//	}
//
//	@PostMapping("/pay")
//	public AjaxResult testPay() throws Exception {
//
//		String reqsn = String.valueOf(System.currentTimeMillis());
//		Map<String, String> map = service.pay(1L, reqsn, "W06", "标题", "备注", "ol5kD7eeXNGeYE5z7uIhk12K-rBA", "123", "https://test.allinpaygd.com/JWeb/NotifyServlet", "", "", "", "", "", "", "", "", "", "", "", "");
//		return success(map);
//	}
}
