src/ZKEACMS.Shop/Service/AliPaymentService.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/* http://www.zkea.net/ 
 * Copyright (c) ZKEASOFT. All rights reserved. 
 * http://www.zkea.net/licenses */

using Alipay.AopSdk.AspnetCore;
using Alipay.AopSdk.Core.Domain;
using Alipay.AopSdk.Core.Request;
using Easy.RepositoryPattern;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ZKEACMS.Shop.Models;
using ZKEACMS.Shop.Payment;

namespace ZKEACMS.Shop.Service
{
    public class AliPaymentService : IPaymentService
    {
        class AliPaymentResponse
        {
            public string code { get; set; }
            public string msg { get; set; }
            public string sub_msg { get; set; }
            public string buyer_logon_id { get; set; }
            public decimal buyer_pay_amount { get; set; }
            public string buyer_user_id { get; set; }
            public string buyer_user_type { get; set; }
            public decimal invoice_amount { get; set; }
            public string out_trade_no { get; set; }
            public decimal point_amount { get; set; }
            public decimal receipt_amount { get; set; }
            public DateTime send_pay_date { get; set; }
            public decimal total_amount { get; set; }
            public string trade_no { get; set; }
            public string trade_status { get; set; }

            public string fund_change { get; set; }
            public string gmt_refund_pay { get; set; }
            public string open_id { get; set; }
            public decimal refund_fee { get; set; }
            public decimal send_back_fee { get; set; }

            public decimal refund_amount { get; set; }
        }
        private readonly IAlipayService _alipayService;
        public AliPaymentService(IAlipayService alipayService)
        {
            _alipayService = alipayService;
        }
        public string Getway => Gateways.AliPay;

        public ServiceResult<bool> CloseOrder(Order order)
        {
            AlipayTradeCloseModel model = new AlipayTradeCloseModel();
            model.OutTradeNo = order.ID;
            model.TradeNo = order.PaymentID;

            AlipayTradeCloseRequest request = new AlipayTradeCloseRequest();
后面还有 86 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。