123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.Generic;
- using System.Web;
- namespace LYFZ.WxPayAPI
- {
- public class Refund
- {
-
- public static string Run(string transaction_id, string out_trade_no, string total_fee, string refund_fee)
- {
- Log.Info("Refund", "Refund is processing...");
- WxPayData data = new WxPayData();
- if (!string.IsNullOrEmpty(transaction_id))
- {
- data.SetValue("transaction_id", transaction_id);
- }
- else
- {
- data.SetValue("out_trade_no", out_trade_no);
- }
- data.SetValue("total_fee", int.Parse(total_fee));
- data.SetValue("refund_fee", int.Parse(refund_fee));
- data.SetValue("out_refund_no", WxPayApi.GenerateOutTradeNo());
- data.SetValue("op_user_id", WxPayConfig.MCHID);
- WxPayData result = WxPayApi.Refund(data);
- Log.Info("Refund", "Refund process complete, result : " + result.ToXml());
- return result.ToPrintStr();
- }
- }
- }
|