电脑网站支付开发指南分享

来自    电脑网站支付 | 
作者:王兰玉  |  更新于:2018-05-10 10:43:15     

本帖仅供参数,非官方demo

文档地址:点击【查看

sdk下载:点击【查看

官方demo下载地址:点击【查看

正式环境准备工作:

           1、签约:https://openclub.alipay.com/read.php?tid=276&fid=72

           2、创建应用:https://openclub.alipay.com/read.php?tid=1606&fid=72

           3、生成密钥:https://openclub.alipay.com/read.php?tid=1833&fid=69

           4、下载服务端sdk:https://docs.open.alipay.com/54/106370/

        支付宝网关修改:支付宝沙箱网关为 https://openapi.alipaydev.com/gateway.do    这边需要将dev去掉。变更为 https://openapi.alipay.com/gateway.do 

java版(适用于jdk1.5以上)

沙箱测试账号

//		沙箱APPID
	public static final  String app_id = "2016101800718925";
	//沙箱私钥
	public static final  String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDfDBUJhaw46ck8MHccIBXPt2USOvCRZ0dQNZZwC0EmZvcnL2+NUyoJMbgcV3U5o6wApajkpibf9UkrtYgI3/GZhOgzfzH0IJYAXmYCEniM+Cl5ipIWhY0W/s+uNRGNdXvNlketNNcVqAvkKZdcHz23N60BXsvjdR+BJ/np2CUmr9OCv0aqqwOO190rOuZvVaFCJD5LDmvDFdXPzrJHcOAyYjb2hhJIWt5n4o/b3LMYeuxfwWuQ4VlGx+s0wZJ1udUyAX8X8byqYcnevG8A1sQd/dRVNr8f1BxS8kjDIDljCzKPoYyoaoeJMhJIxrV8gL57oEIX7PbrlvFLplaC7g/XAgMBAAECggEAI4m/SFceC6tkPszSDY8nKoNj/TWa4u/7stH2+D8y0DWTp5CtS202w2RCm3Fr4hUr8KZ0dInso75nPCmeVRupWPaOMLZRdT5D6CciRa4/uuZHZXAouqHoywMqf+1AsLNJWIZbQUOsCW1PB7mAvlLT+H9Md21tOv6MWH3QGewwbytEcri0YkzroQDso3P08xdZDpXtrmg34tLnrNhw+gl8LOtpkbd0SOrGAsoTAE1vTbSLtTR2PAW7RQZkyKW1ansouzwduamFMhTc+DTc40ODJ5b5xlwTDrXn681E7UTX7JytYTPmjrKFHceX9hQ3vxSkm0fEQ7sXoF0pOBL+7AkOIQKBgQD00qCxCSVE8x2Xb/shayGBLCumqIzHtH5Eb42Wz8AOCH2/Ns9HahzXCJfKWhEzWPltYdD34xlu4T+6r7kN9hNNV7PdHRWMMNyFlUrJ8zSzScu13KdQCx9r+JszD8VRRthNHtWDevj83p3qbwr6rNFw6L7nyjxjRE4RaA56gKdQrwKBgQDpOvOz6JaD941qi7jFxnbOZh2OdRrDUHkCG8Cx42eDA83aCCjLJznjJdLXsF2HON2YDcXOn2pHyROks6a+pZZ3nP3VOX5R06QuPrW5cqF3kxO7+v25DVPI4F3VWz+2mbU5uxlqWIRTZikfnvzZeVQcGgFh3ektI6lVDAo6eD/tWQKBgAEy+uiDE/SngDCass8yGCLq1XfmgXIE901cgoQHlng7IGqMWS2PXn7LIvsxv73RpL8daImeSiSZ49cFP1HLL8MEN/RQTSe3oYzh81DT6SErrlzArO0ecNP1jsUMQbopL6wJB6CyPH/4kytvycz6hbgY276E5hDSZ9N7//4nnSovAoGAP9KgCeVl+urtSfC+OXDb5hNPl0I4dqY41vjdPFCsbM/Hrxh4gU9UqfIZxmg+z9gh25A5Rxecr9Q4ieOXh6gsisLtO0ImbSHrVbRXak4SHXSj+9btQ4yAFwI+6zmzL7bUPt4SUGW0oFXefwa0zpZDDAWZxzxAqNePaPSIgAOUCtECgYEA8zySp0UdBQQOEJuTUJlHgf+FK0jUMREVBi9CQgbK8iF/hDmA34B4z0JCkWEsGojiS3S72ZJBXxrZ8RowJGqLuNZHUAD+eEzjoBhZOIfn2R0Bo2UAZAe6pwERzqOEEVLyBExEV3+qkDwIewx4lghFCQpwhO6SNWj4ppSgXh7XAss=";
	//支付宝公钥
	public static final  String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnVuBUzhfo7kWUN/TS/kHmb4afsAlUVaTR3U5e74V0os1bzlfvh+cpwnwzaEIb36CR1OzeIIzXgARIW/zGAL1/PLG8dFEXQOIGkA0a8YXGVNX9KeWnFCnCQ5gQxrfJ3ryasXzWBxv5bex1VrVsQ2TZ1VdUD+S7dR4SWFHvyck8/xGt3Hz5peUqo/OIlfQpoTBXdqfnJNrTVAMqcQhrIWwgpSVgmUq+UhlZsDaiUvxWWFm9v9nY172jFfzup/DIET//OpIghL6AB2F+ywkCcHdZHiGklnpNoQKQ6XMVKaO/k2nlHU64Y4WGSgJnSG6B798ohZoi3pndrVPAH5+5BKEFQIDAQAB";
	//沙箱网关地址
	public static final  String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

	

 

请求代码

 

	//获得初始化的AlipayClient
		AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.gatewayUrl, AlipayConfig.app_id, AlipayConfig.merchant_private_key, "json", AlipayConfig.charset, AlipayConfig.alipay_public_key, AlipayConfig.sign_type);
		//设置请求参数
		AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();
		//同步通知地址:支付成功后页面自动跳转到传值地址中
		alipayRequest.setReturnUrl("https://docs.open.alipay.com/200");
		//异步通知地址:支付成功生成之后会post返回订单信息详情到该地址,用于商家做业务逻辑处理
		alipayRequest.setNotifyUrl("https://docs.open.alipay.com/200");
	    AlipayTradePagePayModel model = new AlipayTradePagePayModel();
		model.setSubject("电脑网站支付测试");
		model.setTotalAmount("0.01");
		model.setProductCode("FAST_INSTANT_TRADE_PAY");
		//自定义参数请转码后传入该参数内,可以传值逗号,等号之类,但不能传引号,否则会报错,其他特殊符号是否报错以实测为准
		String passback_params	 = "{ab=测试一下;tdst=公共参数;ccsd=gds;dfa=23·12}";
		String passback_params2 =URLEncoder.encode(passback_params,"UTF-8");
		model.setPassbackParams(passback_params2);
		alipayRequest.setBizModel(model);
		/**	
		 * BizContent传值模式
		alipayRequest.setBizContent("{\"out_trade_no\":\""+ out_trade_no +"\"," 
				+ "\"total_amount\":\""+ total_amount +"\","  
				+ "\"subject\":\""+ subject +"\"," 
				+ "\"qr_pay_mode\":\"4\"," 
				+ "\"timeout_express\":\"1m\"," 
				+ "\"passback_params2\":\""+ passback_params2 +"\"," 
				+ "\"product_code\":\"FAST_INSTANT_TRADE_PAY\"}");
				
				**/
		//get请求方式,返回http链接  
		AlipayTradePagePayResponse respose = alipayClient.pageExecute(alipayRequest,"get");
		
		//post请求方式,返回from表单 
		//AlipayTradePagePayResponse respose = alipayClient.pageExecute(alipayRequest);
		
		//打印请求信息
		System.out.println(respose.getBody());

 

php版(适用于ph5.5以上环境) 

<?php
/**
 * 2018-11-05 
 * 欢迎访问支付宝论坛:https://openclub.alipay.com/index.php
 * 
 * APP支付 RSA2签名方法
 */
require_once 'AopSdk.php';
$aop = new AopClient ();
$aop->gatewayUrl = 'https://openapi.alipaydev.com/gateway.do';
$aop->appId = '2016101800718925';
$aop->rsaPrivateKey = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDfDBUJhaw46ck8MHccIBXPt2USOvCRZ0dQNZZwC0EmZvcnL2+NUyoJMbgcV3U5o6wApajkpibf9UkrtYgI3/GZhOgzfzH0IJYAXmYCEniM+Cl5ipIWhY0W/s+uNRGNdXvNlketNNcVqAvkKZdcHz23N60BXsvjdR+BJ/np2CUmr9OCv0aqqwOO190rOuZvVaFCJD5LDmvDFdXPzrJHcOAyYjb2hhJIWt5n4o/b3LMYeuxfwWuQ4VlGx+s0wZJ1udUyAX8X8byqYcnevG8A1sQd/dRVNr8f1BxS8kjDIDljCzKPoYyoaoeJMhJIxrV8gL57oEIX7PbrlvFLplaC7g/XAgMBAAECggEAI4m/SFceC6tkPszSDY8nKoNj/TWa4u/7stH2+D8y0DWTp5CtS202w2RCm3Fr4hUr8KZ0dInso75nPCmeVRupWPaOMLZRdT5D6CciRa4/uuZHZXAouqHoywMqf+1AsLNJWIZbQUOsCW1PB7mAvlLT+H9Md21tOv6MWH3QGewwbytEcri0YkzroQDso3P08xdZDpXtrmg34tLnrNhw+gl8LOtpkbd0SOrGAsoTAE1vTbSLtTR2PAW7RQZkyKW1ansouzwduamFMhTc+DTc40ODJ5b5xlwTDrXn681E7UTX7JytYTPmjrKFHceX9hQ3vxSkm0fEQ7sXoF0pOBL+7AkOIQKBgQD00qCxCSVE8x2Xb/shayGBLCumqIzHtH5Eb42Wz8AOCH2/Ns9HahzXCJfKWhEzWPltYdD34xlu4T+6r7kN9hNNV7PdHRWMMNyFlUrJ8zSzScu13KdQCx9r+JszD8VRRthNHtWDevj83p3qbwr6rNFw6L7nyjxjRE4RaA56gKdQrwKBgQDpOvOz6JaD941qi7jFxnbOZh2OdRrDUHkCG8Cx42eDA83aCCjLJznjJdLXsF2HON2YDcXOn2pHyROks6a+pZZ3nP3VOX5R06QuPrW5cqF3kxO7+v25DVPI4F3VWz+2mbU5uxlqWIRTZikfnvzZeVQcGgFh3ektI6lVDAo6eD/tWQKBgAEy+uiDE/SngDCass8yGCLq1XfmgXIE901cgoQHlng7IGqMWS2PXn7LIvsxv73RpL8daImeSiSZ49cFP1HLL8MEN/RQTSe3oYzh81DT6SErrlzArO0ecNP1jsUMQbopL6wJB6CyPH/4kytvycz6hbgY276E5hDSZ9N7//4nnSovAoGAP9KgCeVl+urtSfC+OXDb5hNPl0I4dqY41vjdPFCsbM/Hrxh4gU9UqfIZxmg+z9gh25A5Rxecr9Q4ieOXh6gsisLtO0ImbSHrVbRXak4SHXSj+9btQ4yAFwI+6zmzL7bUPt4SUGW0oFXefwa0zpZDDAWZxzxAqNePaPSIgAOUCtECgYEA8zySp0UdBQQOEJuTUJlHgf+FK0jUMREVBi9CQgbK8iF/hDmA34B4z0JCkWEsGojiS3S72ZJBXxrZ8RowJGqLuNZHUAD+eEzjoBhZOIfn2R0Bo2UAZAe6pwERzqOEEVLyBExEV3+qkDwIewx4lghFCQpwhO6SNWj4ppSgXh7XAss=';
$aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnVuBUzhfo7kWUN/TS/kHmb4afsAlUVaTR3U5e74V0os1bzlfvh+cpwnwzaEIb36CR1OzeIIzXgARIW/zGAL1/PLG8dFEXQOIGkA0a8YXGVNX9KeWnFCnCQ5gQxrfJ3ryasXzWBxv5bex1VrVsQ2TZ1VdUD+S7dR4SWFHvyck8/xGt3Hz5peUqo/OIlfQpoTBXdqfnJNrTVAMqcQhrIWwgpSVgmUq+UhlZsDaiUvxWWFm9v9nY172jFfzup/DIET//OpIghL6AB2F+ywkCcHdZHiGklnpNoQKQ6XMVKaO/k2nlHU64Y4WGSgJnSG6B798ohZoi3pndrVPAH5+5BKEFQIDAQAB';
$aop->apiVersion = '1.0';
$aop->postCharset='utf-8';
$aop->format='json';
$aop->signType = 'RSA2';

//生成随机订单号
$date=date("YmdHis");
$arr=range(1000,9999);
shuffle($arr);
$request = new AlipayTradePagePayRequest();
//收款方账户类型为:ALIPAY_LOGONID:支付宝登录号,支持邮箱和手机号格式。
$request->setBizContent("{" .
    "\"out_trade_no\":\"".$date.$arr[0]."\"," .
    "\"total_amount\":\"0.1\"," .
	"\"subject\":\"电脑网站支付测试\"," .
    "\"product_code\":\"FAST_INSTANT_TRADE_PAY\"" .
    "}");

$result = $aop->pageExecute($request);

print_r(htmlspecialchars($result));
?>

 

.net版

注:适用于Visual studio 2010及以上版本、Framework3.5 SP1及以上版本的开发环境

沙箱测试代码示例:

using Aop.Api;
using Aop.Api.Request;
using Aop.Api.Response;
using System;
using System.IO;

/**
 * 沙箱电脑网站支付
 * 文档地址:https://docs.open.alipay.com/270/alipay.trade.page.pay
 * */
namespace AlipayTradePagePay
{
    class Program
    {
        //沙箱支付宝公钥,查看地址:https://openhome.alipay.com/platform/appDaily.htm
        public static string alipay_public_key = @"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnVuBUzhfo7kWUN/TS/kHmb4afsAlUVaTR3U5e74V0os1bzlfvh+cpwnwzaEIb36CR1OzeIIzXgARIW/zGAL1/PLG8dFEXQOIGkA0a8YXGVNX9KeWnFCnCQ5gQxrfJ3ryasXzWBxv5bex1VrVsQ2TZ1VdUD+S7dR4SWFHvyck8/xGt3Hz5peUqo/OIlfQpoTBXdqfnJNrTVAMqcQhrIWwgpSVgmUq+UhlZsDaiUvxWWFm9v9nY172jFfzup/DIET//OpIghL6AB2F+ywkCcHdZHiGklnpNoQKQ6XMVKaO/k2nlHU64Y4WGSgJnSG6B798ohZoi3pndrVPAH5+5BKEFQIDAQAB";

        //沙箱pkcs1私钥,千万不要用pkcs8格式的 ,如何获取,请查看:https://openclub.alipay.com/read.php?tid=1833&fid=25
        public static string merchant_private_key = @"MIIEowIBAAKCAQEA3wwVCYWsOOnJPDB3HCAVz7dlEjrwkWdHUDWWcAtBJmb3Jy9vjVMqCTG4HFd1OaOsAKWo5KYm3/VJK7WICN/xmYToM38x9CCWAF5mAhJ4jPgpeYqSFoWNFv7PrjURjXV7zZZHrTTXFagL5CmXXB89tzetAV7L43UfgSf56dglJq/Tgr9GqqsDjtfdKzrmb1WhQiQ+Sw5rwxXVz86yR3DgMmI29oYSSFreZ+KP29yzGHrsX8FrkOFZRsfrNMGSdbnVMgF/F/G8qmHJ3rxvANbEHf3UVTa/H9QcUvJIwyA5Ywsyj6GMqGqHiTISSMa1fIC+e6BCF+z265bxS6ZWgu4P1wIDAQABAoIBACOJv0hXHgurZD7M0g2PJyqDY/01muLv+7LR9vg/MtA1k6eQrUttNsNkQptxa+IVK/CmdHSJ7KO+ZzwpnlUbqVj2jjC2UXU+Q+gnIkWuP7rmR2VwKLqh6MsDKn/tQLCzSViGW0FDrAltTwe5gL5S0/h/THdtbTr+jFh90BnsMG8rRHK4tGJM66EA7KNz9PMXWQ6V7a5oN+LS56zYcPoJfCzraZG3dEjqxgLKEwBNb020i7U0djwFu0UGZMiltWp7KLs8HbmphTIU3Pg03ONDgyeW+cZcEw615+vNRO1E1+ycrWEz5o6yhR3Hl/YUN78UpJtHxEO7F6BdKTgS/uwJDiECgYEA9NKgsQklRPMdl2/7IWshgSwrpqiMx7R+RG+Nls/ADgh9vzbPR2oc1wiXyloRM1j5bWHQ9+MZbuE/uq+5DfYTTVez3R0VjDDchZVKyfM0s0nLtdynUAsfa/ibMw/FUUbYTR7Vg3r4/N6d6m8K+qzRcOi+58o8Y0ROEWgOeoCnUK8CgYEA6Trzs+iWg/eNaou4xcZ2zmYdjnUaw1B5AhvAseNngwPN2ggoyyc54yXS17BdhzjdmA3Fzp9qR8kTpLOmvqWWd5z91Tl+UdOkLj61uXKhd5MTu/r9uQ1TyOBd1Vs/tpm1ObsZaliEU2YpH5782XlUHBoBYd3pLSOpVQwKOng/7VkCgYABMvrogxP0p4AwmrLPMhgi6tV35oFyBPdNXIKEB5Z4OyBqjFktj15+yyL7Mb+90aS/HWiJnkokmePXBT9Ryy/DBDf0UE0nt6GM4fNQ0+khK65cwKztHnDT9Y7FDEG6KS+sCQegsjx/+JMrb8nM+oW4GNu+hOYQ0mfTe//+J50qLwKBgD/SoAnlZfrq7Unwvjlw2+YTT5dCOHamONb43TxQrGzPx68YeIFPVKnyGcZoPs/YIduQOUcXnK/UOInjl4eoLIrC7TtCJm0h61W0V2pOEh10o/vW7UOMgBcCPus5sy+21D7eElBltKBV3n8GtM6WQwwFmcc8QKjXj2j0iIADlArRAoGBAPM8kqdFHQUEDhCbk1CZR4H/hStI1DERFQYvQkIGyvIhf4Q5gN+AeM9CQpFhLBqI4kt0u9mSQV8a2fEaMCRqi7jWR1AA/nhM46AYWTiH59kdAaNlAGQHuqcBEc6jhBFS8gRMRFd/qpA8CHsMeJYIRQkKcITukjVo+KaUoF4e1wLL";

        static void Main(string[] args)
        {
            //初始化
            IAopClient alipayClient = new DefaultAopClient("https://openapi.alipaydev.com/gateway.do", "2016101800718925", merchant_private_key, "json", "1.0", "RSA2", alipay_public_key, "utf-8", false);
            AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
            //请求参数设置
            request.BizContent = "{\"out_trade_no\":\"201810201450FDSa\",\"subject\":\"沙箱测试\",\"product_code\":\"FAST_INSTANT_TRADE_PAY\",\"total_amount\":\"0.01\"}";
            //同步跳转地址,用于订单支付成功之后同步跳转
            request.SetReturnUrl("https://docs.open.alipay.com/200");
            //异步跳转地址,用于接收异步返回结果
            request.SetNotifyUrl("https://docs.open.alipay.com/200");
            //默认是post请求方式,返回form表单
            AlipayTradePagePayResponse response = alipayClient.pageExecute(request);
            //get请求方式,返回请求链接
            //AlipayTradePagePayResponse response = client.pageExecute(alipayRequest, "", "GET");
            //打印返回结果
            Console.WriteLine(response.Body);
        }

        // 私钥文件类型转换成纯文本类型 返回过滤后的字符串类型私钥
        public static string getMerchantPriveteKeyStr()
        {
            StreamReader sr = new StreamReader(merchant_private_key);
            string pubkey = sr.ReadToEnd();
            sr.Close();
            if (pubkey != null)
            {
                pubkey = pubkey.Replace("-----BEGIN PUBLIC KEY-----", "");
                pubkey = pubkey.Replace("-----END PUBLIC KEY-----", "");
                pubkey = pubkey.Replace("\r", "");
                pubkey = pubkey.Replace("\n", "");
            }
            return pubkey;
        }
    }
}

 

post请求返回结果:

<form id='alipaysubmit' name='alipaysubmit' action='https://openapi.alipaydev.com/gateway.do?charset=utf-8' method='get' style='display:none;'><input  name='app_id' value='2016101800718925'/><input  name='biz_content' value='{"out_trade_no":"201810201450FDSa","subject":"沙箱测试","product_code":"FAST_INSTANT_TRADE_PAY","total_amount":"0.01"}'/><input  name='charset' value='utf-8'/><input  name='format' value='json'/><input  name='method' value='alipay.trade.page.pay'/><input name='notify_url' value='https://docs.open.alipay.com/200'/><input  name='return_url' value='https://docs.open.alipay.com/200'/><input  name='sign_type' value='RSA2'/><input  name='timestamp' value='2018-05-10 10:22:40'/><input  name='version' value='1.0'/><input  name='sign' value='iQ0YEXzDlVDMtQoLZg6plCvZnknTrM7/UcbsFPOxF4DiDsZTcqDxkGHngxrUHq4fqlJCiVT6c5PanCpHDhJ9qb2xZenw/hWaakwQ4AR1xyl7sC21C37fB6Z68lE6CVqqsIzsOok0An4UsbJ8iPrQnBy7HZjF/DqU5CT/hUy/0mczcyCcS7GhzIZGLfeWKULEpDnghJpYLcIDZQ7UNxxj/gRY4+6QnE9EiuuyEDMba4X47y/KUqPBaXeCL72VKfbx9hif299BBBv6y88cbWh/zbr/wqB568AYYhaXX5P74/0O6alnVFiq5MIMR6n4d34IKe1hAAb+jNN1+dz3jssxPA=='/><input type='submit' value='get' style='display:none;'></form><script>document.forms['alipaysubmit'].submit();</script>

get请求返回结果

https://openapi.alipaydev.com/gateway.do?app_id=2016101800718925&biz_content=%7b%22out_trade_no%22%3a%2220180925151812345434123%22%2c%22product_code%22%3a%22QUICK_WAP_WAY%22%2c%22qrcode_width%22%3a0%2c%22subject%22%3a%22%b5%e7%c4%d4%cd%f8%d5%be%d6%a7%b8%b6%b2%e2%ca%d4%22%2c%22total_amount%22%3a%220.01%22%7d&charset=GBK&format=json&method=alipay.trade.page.pay&sign_type=RSA2&timestamp=2018-09-25+10%3a40%3a34&version=1.0&sign=bhJdnJ0tQ%2bm4xOb8PfoW6JJkrp2rVfFN2b7ZKBcONEG8GU1JpTuukyf%2b66c0xoJ%2fL3OJaGqrR%2ftFHmCdVQJNuRtWUrMNxyVpVAL44U4dgQM61UFNUUx7%2f2EdLs2Tu21m8uzoWnRi3ER2zPFFllIr%2bdwK28GZHCSs8HrNVCLbKfyiMHzDb9m2fP6YM1Tw4nVOGz2xn6VcjXv2wkycZVpfKkv%2bd%2fZosNQFbgyFinoEttl%2bzB4%2fhSXl4wqQzpcM3WCpeH4QvDuaJPN1nPwJVG79fHQInx6YahZSyzk2qLhPAr0YEqVAso2z75JUaOif9BWXPAu%2fCSNJiEUnXwkfn1xlYQ%3d%3d

 

将返回form表单放到前台页面进行访问:

qr_pay_mode参数可以控制二维码的显示效果
    0:订单码-简约前置模式,对应iframe宽度不能小于600px,高度不能小于300px;
    1:订单码-前置模式,对应iframe宽度不能小于300px,高度不能小于600px;
    3:订单码-迷你前置模式,对应iframe宽度不能小于75px,高度不能小于75px;
    4:订单码-可定义宽度的嵌入式二维码,商户可根据需要设定二维码的大小。
 
注:
  1.此时支付宝订单还未创建,调用查询接口查询会报“订单号不存在”,只有使用手机钱包扫码之后,或者在电脑上点击右侧【登陆账号】付款,输入账号密码登陆之后才会创建订单
  2.如果没有传值return_url ,支付成功页面也不会跳转
  3.如果传值了timeout_express,页面上就会显示倒计时,倒计时完了之后,就会跳转到超时关闭页面

 

使用沙箱环境,必须使用沙箱钱包扫码支付,不能用我们日常支付用支付宝钱包,或者登陆沙箱账号进行支付即可!

沙箱账号查看地址:https://openhome.alipay.com/platform/appDaily.htm?tab=account

沙箱钱包请扫码下载下载:

 

ketwo | 2018-05-29 16:04:18
错误代码 invalid-app-id 错误原因: 无效的AppID参数 是什么原因?
天籁 | 2018-05-29 16:08:33
ketwo:错误代码 invalid-app-id 错误原因: 无效的AppID参数 是什么原因?回到原帖
这个一般是appid使用错误或是你的网关使用错误导致 详细的建议你参考这个自查文档:https://openclub.alipay.com/read.php?tid=1909&fid=72 有问题再追问
ketwo | 2018-05-30 11:36:04
再问一下 付款时跳出“抱歉,系统网络繁忙,您暂时无法付款,请稍后再试”,大致会是什么问题?谢谢
天籁 | 2018-05-30 14:13:09
ketwo:再问一下 付款时跳出“抱歉,系统网络繁忙,您暂时无法付款,请稍后再试”,大致会是什么问题?谢谢回到原帖
请问是沙箱测试还是正式账号测试 请你这边提供一下请求参数 这边看一下
汇铭 | 2018-12-03 11:37:11
支付成功不会跳转怎么回事呢?异步回调收到了信息,但是同步回调URL报404错误,请问哪里有错误, 404 Not Found The requested URL was not found on this server. Sorry for the inconvenience. Please report this message and include the following information to us. Thank you very much! URL: http://unitradeprod.daily.alipaydev.com/acq/cashierReturn.htm?sign=K1iSL1gn5tqoqf%252BsdeCj%252FBq6iouzkfhoqysW631VNws4CuNb2jO0lnkoozuPSfIZQpMBdBs%253D&outTradeNo=2015032001010100606&pid=2088102176435704&type=1 Server: gateway-2.daily.alipay.net Date: 2018/12/03 11:01:56 Powered by Tengine
王兰玉 | 2018-12-03 12:02:52
汇铭:支付成功不会跳转怎么回事呢?异步回调收到了信息,但是同步回调URL报404错误,请问哪里有错误, 404 Not Found The requested URL was not found on this server. Sorry fo...回到原帖
你好,请问你是沙箱环境测试同步跳转404吗?请请提供一下贵司支付宝账号+沙箱appid+钉钉号(私信提供),这边返回确认之后再给您准确回复
我的回复
回复数
  6
阅读数
  1441
相关推荐

返回顶部