Skip to content

xinetzone/SpecWeave / .agents/skills/alipay-payment-integration

alipay-payment-integration

Flagged

支付宝开放平台支付产品接入最佳实践。涵盖当面付、订单码支付、App 支付、JSAPI 支付、手机网站支付、电脑网站支付、预授权支付、商家扣款等全场景产品选型与集成指导。 当用户提到"接入支付宝"、"集成支付宝支付"、"对接支付"、"支付宝收款"、"加个支付功能"、"支付宝下单"、"H5 支付"、"小程序支付"、"预授权"、"付款码"、"扫码支付"、"网页支付"、"PC 支付"、"周期扣款"、"自动续费"、"会员订阅"、"连续包月"、"代扣"时,或咨询支付产品相关报错、排查问题时使用此 Skill。

FileKindSize
SKILL.mdskill md24.8 KB
references/alipay-sandbox/EXAMPLES.mdmarkdown1.3 KB
references/alipay-sandbox/alipay-sandbox-tool.mdmarkdown2.2 KB
references/alipay-sandbox/sandbox-setup-guide.mdmarkdown9.5 KB
references/code-examples/csharp/1_通用接口/收单退款冲退完成通知接口代码示例.mdmarkdown1.2 KB
references/code-examples/csharp/1_通用接口/查询对账单下载地址接口代码示例.mdmarkdown3.0 KB
references/code-examples/csharp/1_通用接口/统一收单交易撤销接口代码示例.mdmarkdown2.7 KB
references/code-examples/csharp/1_通用接口/统一收单交易查询接口代码示例.mdmarkdown7.1 KB
references/code-examples/csharp/1_通用接口/统一收单交易退款接口代码示例.mdmarkdown6.8 KB
references/code-examples/csharp/1_通用接口/统一收单交易退款查询接口代码示例.mdmarkdown5.9 KB
references/code-examples/csharp/2_当面付/统一收单交易支付接口代码示例.mdmarkdown6.5 KB
references/code-examples/csharp/3_订单码支付/统一收单线下交易预创建接口代码示例.mdmarkdown4.7 KB
references/code-examples/csharp/4_手机网站支付/手机网站支付接口代码示例.mdmarkdown6.8 KB
references/code-examples/csharp/5_电脑网站支付/统一收单下单并支付页面接口代码示例.mdmarkdown7.9 KB
references/code-examples/csharp/6_JSAPI支付/统一收单交易创建接口代码示例.mdmarkdown3.8 KB
references/code-examples/csharp/7_APP支付/APP支付接口代码示例.mdmarkdown5.8 KB
references/code-examples/csharp/8_预授权支付/线上资金授权冻结接口代码示例.mdmarkdown6.2 KB
references/code-examples/csharp/8_预授权支付/统一收单交易支付接口(预授权转支付)代码示例.mdmarkdown6.0 KB
references/code-examples/csharp/8_预授权支付/资金授权冻结接口代码示例.mdmarkdown5.4 KB
references/code-examples/csharp/8_预授权支付/资金授权发码接口代码示例.mdmarkdown5.2 KB
references/code-examples/csharp/8_预授权支付/资金授权撤销接口代码示例.mdmarkdown3.4 KB
references/code-examples/csharp/8_预授权支付/资金授权操作查询接口代码示例.mdmarkdown4.4 KB
references/code-examples/csharp/8_预授权支付/资金授权解冻接口代码示例.mdmarkdown3.3 KB
references/code-examples/csharp/9_商家扣款/APP支付接口(支付并签约)代码示例.mdmarkdown4.7 KB
references/code-examples/csharp/9_商家扣款/支付宝个人代扣协议查询接口代码示例.mdmarkdown4.8 KB
references/code-examples/csharp/9_商家扣款/支付宝个人代扣协议解约接口代码示例.mdmarkdown3.9 KB
references/code-examples/csharp/9_商家扣款/统一收单交易支付接口(商家扣款)代码示例.mdmarkdown6.4 KB
references/code-examples/interface-guide.mdmarkdown12.5 KB
references/code-examples/java/1_通用接口/收单退款冲退完成通知接口代码示例.mdmarkdown1.3 KB
references/code-examples/java/1_通用接口/查询对账单下载地址接口代码示例.mdmarkdown3.4 KB
references/code-examples/java/1_通用接口/统一收单交易撤销接口代码示例.mdmarkdown3.0 KB
references/code-examples/java/1_通用接口/统一收单交易查询接口代码示例.mdmarkdown7.4 KB
references/code-examples/java/1_通用接口/统一收单交易退款接口代码示例.mdmarkdown7.2 KB
references/code-examples/java/1_通用接口/统一收单交易退款查询接口代码示例.mdmarkdown6.3 KB
references/code-examples/java/2_当面付/统一收单交易支付接口代码示例.mdmarkdown6.9 KB
references/code-examples/java/3_订单码支付/统一收单线下交易预创建接口代码示例.mdmarkdown5.0 KB
references/code-examples/java/4_手机网站支付/手机网站支付接口代码示例.mdmarkdown7.1 KB
references/code-examples/java/5_电脑网站支付/统一收单下单并支付页面接口代码示例.mdmarkdown8.2 KB
references/code-examples/java/6_JSAPI支付/统一收单交易创建接口代码示例.mdmarkdown4.2 KB
references/code-examples/java/7_APP支付/APP支付接口代码示例.mdmarkdown6.1 KB
references/code-examples/java/8_预授权支付/线上资金授权冻结接口代码示例.mdmarkdown6.5 KB
references/code-examples/java/8_预授权支付/统一收单交易支付接口(预授权转支付)代码示例.mdmarkdown6.5 KB
references/code-examples/java/8_预授权支付/资金授权冻结接口代码示例.mdmarkdown5.9 KB
references/code-examples/java/8_预授权支付/资金授权发码接口代码示例.mdmarkdown5.6 KB
references/code-examples/java/8_预授权支付/资金授权撤销接口代码示例.mdmarkdown3.8 KB
references/code-examples/java/8_预授权支付/资金授权操作查询接口代码示例.mdmarkdown4.8 KB
references/code-examples/java/8_预授权支付/资金授权解冻接口代码示例.mdmarkdown3.8 KB
references/code-examples/java/9_商家扣款/APP支付接口(支付并签约)代码示例.mdmarkdown5.1 KB
references/code-examples/java/9_商家扣款/支付宝个人代扣协议查询接口代码示例.mdmarkdown5.1 KB
references/code-examples/java/9_商家扣款/支付宝个人代扣协议解约接口代码示例.mdmarkdown4.2 KB
references/code-examples/java/9_商家扣款/统一收单交易支付接口(商家扣款)代码示例.mdmarkdown6.9 KB
references/code-examples/nodejs/1_通用接口/收单退款冲退完成通知接口代码示例.mdmarkdown1.1 KB
references/code-examples/nodejs/1_通用接口/查询对账单下载地址接口代码示例.mdmarkdown1.6 KB
references/code-examples/nodejs/1_通用接口/统一收单交易撤销接口代码示例.mdmarkdown1.5 KB
references/code-examples/nodejs/1_通用接口/统一收单交易查询接口代码示例.mdmarkdown5.6 KB
references/code-examples/nodejs/1_通用接口/统一收单交易退款接口代码示例.mdmarkdown4.1 KB
references/code-examples/nodejs/1_通用接口/统一收单交易退款查询接口代码示例.mdmarkdown4.4 KB
references/code-examples/nodejs/2_当面付/统一收单交易支付接口代码示例.mdmarkdown3.5 KB
references/code-examples/nodejs/3_订单码支付/统一收单线下交易预创建接口代码示例.mdmarkdown2.6 KB
references/code-examples/nodejs/4_手机网站支付/手机网站支付接口代码示例.mdmarkdown3.7 KB
references/code-examples/nodejs/5_电脑网站支付/统一收单下单并支付页面接口代码示例.mdmarkdown4.2 KB
references/code-examples/nodejs/7_APP支付/APP支付接口代码示例.mdmarkdown2.9 KB
references/code-examples/nodejs/8_预授权支付/统一收单交易支付接口(预授权转支付)代码示例.mdmarkdown3.5 KB
references/code-examples/nodejs/9_商家扣款/APP支付接口(支付并签约)代码示例.mdmarkdown2.4 KB
references/code-examples/nodejs/9_商家扣款/统一收单交易支付接口(商家扣款)代码示例.mdmarkdown3.6 KB
references/code-examples/php/1_通用接口/收单退款冲退完成通知接口代码示例.mdmarkdown664 B
references/code-examples/php/1_通用接口/查询对账单下载地址接口代码示例.mdmarkdown2.5 KB
references/code-examples/php/1_通用接口/统一收单交易撤销接口代码示例.mdmarkdown2.3 KB
references/code-examples/php/1_通用接口/统一收单交易查询接口代码示例.mdmarkdown6.6 KB
references/code-examples/php/1_通用接口/统一收单交易退款接口代码示例.mdmarkdown5.8 KB
references/code-examples/php/1_通用接口/统一收单交易退款查询接口代码示例.mdmarkdown5.4 KB
references/code-examples/php/2_当面付/统一收单交易支付接口代码示例.mdmarkdown5.4 KB
references/code-examples/php/3_订单码支付/统一收单线下交易预创建接口代码示例.mdmarkdown3.7 KB
references/code-examples/php/4_手机网站支付/手机网站支付接口代码示例.mdmarkdown5.4 KB
references/code-examples/php/5_电脑网站支付/统一收单下单并支付页面接口代码示例.mdmarkdown6.2 KB
references/code-examples/php/6_JSAPI支付/统一收单交易创建接口代码示例.mdmarkdown3.1 KB
references/code-examples/php/7_APP支付/APP支付接口代码示例.mdmarkdown4.5 KB
references/code-examples/php/8_预授权支付/线上资金授权冻结接口代码示例.mdmarkdown5.0 KB
references/code-examples/php/8_预授权支付/统一收单交易支付接口(预授权转支付)代码示例.mdmarkdown5.2 KB
references/code-examples/php/8_预授权支付/资金授权冻结接口代码示例.mdmarkdown4.6 KB
references/code-examples/php/8_预授权支付/资金授权发码接口代码示例.mdmarkdown4.3 KB
references/code-examples/php/8_预授权支付/资金授权撤销接口代码示例.mdmarkdown2.9 KB
references/code-examples/php/8_预授权支付/资金授权操作查询接口代码示例.mdmarkdown3.8 KB
references/code-examples/php/8_预授权支付/资金授权解冻接口代码示例.mdmarkdown2.9 KB
references/code-examples/php/9_商家扣款/APP支付接口(支付并签约)代码示例.mdmarkdown3.6 KB
references/code-examples/php/9_商家扣款/支付宝个人代扣协议查询接口代码示例.mdmarkdown4.2 KB
references/code-examples/php/9_商家扣款/支付宝个人代扣协议解约接口代码示例.mdmarkdown3.2 KB
references/code-examples/php/9_商家扣款/统一收单交易支付接口(商家扣款)代码示例.mdmarkdown5.4 KB
references/code-examples/python/1_通用接口/收单退款冲退完成通知接口代码示例.mdmarkdown1.3 KB
references/code-examples/python/1_通用接口/查询对账单下载地址接口代码示例.mdmarkdown2.4 KB
references/code-examples/python/1_通用接口/统一收单交易撤销接口代码示例.mdmarkdown2.2 KB
references/code-examples/python/1_通用接口/统一收单交易查询接口代码示例.mdmarkdown6.3 KB
references/code-examples/python/1_通用接口/统一收单交易退款接口代码示例.mdmarkdown5.2 KB
references/code-examples/python/1_通用接口/统一收单交易退款查询接口代码示例.mdmarkdown5.2 KB
references/code-examples/python/2_当面付/统一收单交易支付接口代码示例.mdmarkdown3.6 KB
references/code-examples/python/3_订单码支付/统一收单线下交易预创建接口代码示例.mdmarkdown2.1 KB
references/code-examples/python/4_手机网站支付/手机网站支付接口代码示例.mdmarkdown3.0 KB
references/code-examples/python/5_电脑网站支付/统一收单下单并支付页面接口代码示例.mdmarkdown3.2 KB
references/code-examples/python/7_APP支付/APP支付接口代码示例.mdmarkdown2.4 KB
references/main/alipay-sdk-reminder.mdmarkdown11.5 KB
references/main/checklist.mdmarkdown5.5 KB
references/main/product-decision.mdmarkdown4.9 KB

references/code-examples/csharp/8_预授权支付/线上资金授权冻结接口代码示例.md

View on GitHub
# 线上资金授权冻结接口 - C# 示例

## 请求示例

```csharp
using System;
using System.Collections.Generic;
using Aop.Api;
using Aop.Api.Request;
using Aop.Api.Response;
using Aop.Api.Domain;
using Aop.Api.Util;
namespace SdkDemoTest
{
    public class AlipayFundAuthOrderAppFreeze
    {
        public static void Main(string[] args) 
        {
            // 初始化SDK
            IAopClient alipayClient = new DefaultAopClient(GetAlipayConfig());
            // 构造请求参数以调用接口
            AlipayFundAuthOrderAppFreezeRequest request = new AlipayFundAuthOrderAppFreezeRequest();
            AlipayFundAuthOrderAppFreezeModel model = new AlipayFundAuthOrderAppFreezeModel();
            
            // 设置商户授权资金订单号
            model.OutOrderNo = "8077735255938023";
            
            // 设置商户本次资金操作的请求流水号
            model.OutRequestNo = "8077735255938032";
            
            // 设置订单标题
            model.OrderTitle = "XX租车押金";
            
            // 设置需要冻结的金额
            model.Amount = "0.01";
            
            // 设置销售产品码
            model.ProductCode = "PREAUTH_PAY";
            
            // 设置收款账户的支付宝用户号
            model.PayeeUserId = "2088102000275795";
            
            // 设置收款账户的支付宝登录号(email或手机号)
            model.PayeeLogonId = "159****5620";
            
            // 设置预授权订单相对超时时间
            model.TimeoutExpress = "2d";
            
            // 设置无特殊需要请勿传入
            model.EnablePayChannels = "[{\"payChannelType\":\"PCREDIT_PAY\"},{\"payChannelType\":\"MONEY_FUND\"}]";
            
            // 设置无特殊需要请勿传入
            model.DisablePayChannels = "[{\"payChannelType\":\"OPTIMIZED_MOTO\"},{\"payChannelType\":\"BIGAMOUNT_CREDIT_CARTOON\"}]";
            
            // 设置无特殊需要请勿传入
            model.IdentityParams = "{\"identity_hash\":\"acc2b92ffc5ed9b472faa19748f10045c30434132784f774b00216a56b8841c6\"}";
            
            // 设置业务扩展参数
            model.ExtraParam = "{\"category\":\"CHARGE_PILE_CAR\",\"serviceId\":\"2020042800000000000001450466\"}";
            
            // 设置业务参数
            model.BusinessParams = "{\"outRiskInfo\":\"{\"mcCreateTradeTime\":\"2022-03-11 12:46:09\",\"extraAccountCertnoLastSix\":\"000011\",\"mobileOperatingPlatform\":\"ios\",\"sysVersion\":\"15.4.2\",\"mcCreateTradeIp\":\"11.110.111.43\"}\"}";
            
            // 设置免押受理台模式
            model.DepositProductMode = "POSTPAY";
            
            // 设置后付费项目
            List<PostPayment> postPayments = new List<PostPayment>();
            PostPayment postPayments0 = new PostPayment();
            postPayments0.Amount = "0.01";
            postPayments0.Name = "租金";
            postPayments0.Description = "2元/小时,99元封顶";
            postPayments.Add(postPayments0);
            model.PostPayments = postPayments;
            
            request.SetBizModel(model);
            // 第三方代调用模式下请设置app_auth_token
            // request.PutOtherTextParam("app_auth_token", "<-- 请填写应用授权令牌 -->");

            AlipayFundAuthOrderAppFreezeResponse response = alipayClient.SdkExecute(request);
            string orderStr = response.Body;
            Console.WriteLine(orderStr);

            if(!response.IsError)
            {
                Console.WriteLine("调用成功");
            }
            else
            {
                Console.WriteLine("调用失败");
            }
        }

        private static AlipayConfig GetAlipayConfig()
        {
            string privateKey  = "<-- 请填写您的应用私钥,例如:MIIEvQIBADANB ... ... -->";
            string alipayPublicKey = "<-- 请填写您的支付宝公钥,例如:MIIBIjANBg... -->";
            AlipayConfig alipayConfig = new AlipayConfig();
            alipayConfig.ServerUrl = "https://openapi.alipay.com/gateway.do";
            alipayConfig.AppId = "<-- 请填写您的AppId,例如:2019091767145019 -->";
            alipayConfig.PrivateKey = privateKey;
            alipayConfig.Format = "json";
            alipayConfig.AlipayPublicKey = alipayPublicKey;
            alipayConfig.Charset = "UTF-8";
            alipayConfig.SignType = "RSA2";
            return alipayConfig;
        }
    }
}
```

## 响应示例
### 正常示例
```
app_id=2017060101317939&biz_content=%7B%22post_payments%22%3A%22%22%2C%22order_title%22%3A%22XX%E7%A7%9F%E8%BD%A6%E6%8A%BC%E9%87%91%22%2C%22amount%22%3A%220.01%22%2C%22payee_user_id%22%3A%222088102000275795%22%2C%22out_order_no%22%3A%228077735255938023%22%2C%22product_code%22%3A%22PREAUTH_PAY%22%2C%22payee_logon_id%22%3A%22159****5620%22%2C%22enable_pay_channels%22%3A%22%5B%7B%5C%22payChannelType%5C%22%3A%5C%22PCREDIT_PAY%5C%22%7D%2C%7B%5C%22payChannelType%5C%22%3A%5C%22MONEY_FUND%5C%22%7D%5D%22%2C%22deposit_product_mode%22%3A%22POSTPAY%22%2C%22identity_params%22%3A%22%7B%5C%22identity_hash%5C%22%3A%5C%22acc2b92ffc5ed9b472faa19748f10045c30434132784f774b00216a56b8841c6%5C%22%7D%22%2C%22business_params%22%3A%22%7B%5C%22outRiskInfo%5C%22%3A%5C%22%7B%5C%5C%5C%22mcCreateTradeTime%5C%5C%5C%22%3A%5C%5C%5C%222022-03-11+12%3A46%3A09%5C%5C%5C%22%2C%5C%5C%5C%22extraAccountCertnoLastSix%5C%5C%5C%22%3A%5C%5C%5C%22000011%5C%5C%5C%22%2C%5C%5C%5C%22mobileOperatingPlatform%5C%5C%5C%22%3A%5C%5C%5C%22ios%5C%5C%5C%22%2C%5C%5C%5C%22sysVersion%5C%5C%5C%22%3A%5C%5C%5C%2215.4.2%5C%5C%5C%22%2C%5C%5C%5C%22mcCreateTradeIp%5C%5C%5C%22%3A%5C%5C%5C%2211.110.111.43%5C%5C%5C%22%7D%5C%22%7D%22%2C%22timeout_express%22%3A%222d%22%2C%22disable_pay_channels%22%3A%22%5B%7B%5C%22payChannelType%5C%22%3A%5C%22OPTIMIZED_MOTO%5C%22%7D%2C%7B%5C%22payChannelType%5C%22%3A%5C%22BIGAMOUNT_CREDIT_CARTOON%5C%22%7D%5D%22%2C%22out_request_no%22%3A%228077735255938032%22%2C%22extra_param%22%3A%22%7B%5C%22category%5C%22%3A%5C%22CHARGE_PILE_CAR%5C%22%2C%5C%22serviceId%5C%22%3A%5C%222020042800000000000001450466%5C%22%7D%22%7D&charset=UTF-8&format=json&method=alipay.fund.auth.order.app.freeze&sign=ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE&sign_type=RSA2&timestamp=2014-07-24+03%3A07%3A50&version=1.0
```

reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall