{"id":1531,"date":"2023-03-25T15:13:36","date_gmt":"2023-03-25T07:13:36","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1531"},"modified":"2023-04-27T21:42:39","modified_gmt":"2023-04-27T13:42:39","slug":"alipay-applet-payment-access","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/alipay-applet-payment-access\/","title":{"rendered":"\u652f\u4ed8\u5b9d\u5c0f\u7a0b\u5e8f\u652f\u4ed8\u63a5\u5165"},"content":{"rendered":"<p>\u5c0f\u7a0b\u5e8f\u652f\u4ed8\u6587\u6863\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/opendocs.alipay.com\/mini\/introduce\/pay\">https:\/\/opendocs.alipay.com\/mini\/introduce\/pay<\/a><br \/>\n\u65e0\u9700\u5f15\u5165\u989d\u5916\u5e93\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/opendocs.alipay.com\/mini\/api\/openapi-pay\">https:\/\/opendocs.alipay.com\/mini\/api\/openapi-pay<\/a><br \/>\n\u9700\u8981\u5f15\u5165Alipay JSSDK\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/myjsapi.alipay.com\/alipayjsapi\/util\/pay\/tradePay.html\">https:\/\/myjsapi.alipay.com\/alipayjsapi\/util\/pay\/tradePay.html<\/a><\/p>\n<h2>JSAPI\u652f\u4ed8<\/h2>\n<p><!-- more --><\/p>\n<h3>\u652f\u4ed8\u5b9d\u539f\u751f<\/h3>\n<pre><code class=\"language-javascript\">\/\/ .js\nmy.tradePay({\n  \/\/ \u8c03\u7528\u7edf\u4e00\u6536\u5355\u4ea4\u6613\u521b\u5efa\u63a5\u53e3\uff08alipay.trade.create\uff09\uff0c\u83b7\u5f97\u8fd4\u56de\u5b57\u6bb5\u652f\u4ed8\u5b9d\u4ea4\u6613\u53f7trade_no\n  tradeNO: &#039;201711152100110410533667792&#039;,\n  success: (res) =&gt; {\n    my.alert({\n      content: JSON.stringify(res),\n    });\n  },\n  fail: (res) =&gt; {\n    my.alert({\n      content: JSON.stringify(res),\n    });\n  }\n});<\/code><\/pre>\n<h3>uni-app<\/h3>\n<pre><code class=\"language-javascript\">uni.requestPayment({\n    provider: &#039;alipay&#039;,\n    orderInfo: &#039;orderInfo&#039;, \/\/\u652f\u4ed8\u5b9d\u8ba2\u5355\u4ea4\u6613\u53f7\n    success: function (res) {\n        console.log(&#039;success:&#039; + JSON.stringify(res));\n    },\n    fail: function (err) {\n        console.log(&#039;fail:&#039; + JSON.stringify(err));\n    }\n});<\/code><\/pre>\n<h2>WAP\u652f\u4ed8<\/h2>\n<h3>\u652f\u4ed8\u5b9d\u539f\u751f<\/h3>\n<pre><code class=\"language-javascript\">\/\/ .js\nmy.tradePay({\n  \/\/ \u8c03\u7528\u8d44\u91d1\u51bb\u7ed3\u63a5\u53e3\uff08alipay.fund.auth.order.app.freeze\uff09\uff0c\u83b7\u53d6\u8d44\u91d1\u6388\u6743\u53c2\u6570\n  orderStr: &#039;alipay_sdk=alipay-sdk-java-3.0.118.DEV&amp;app_id=2018112803019836&amp;biz_content=%7B%22amount%22%3A%220.02%22%2C%22extra_param%22%3A%22%7B%5C%22category%5C%22%3A%5C%22CHARGE_PILE_CAR%5C%22%7D%22%2C%22order_title%22%3A%22%D6%A7%B8%B6%B1%A6%D4%A4%CA%DA%C8%A8%22%2C%22out_order_no%22%3A%22ZMOutOrderNoAppFreeze2018052915543415090975%22%2C%22out_request_no%22%3A%22ZMOutReqNoAppFreeze20180529155434581875858%22%2C%22pay_timeout%22%3A%222d%22%2C%22payee_user_id%22%3A%222088202224929664%22%2C%22product_code%22%3A%22PRE_AUTH_ONLINE%22%7D&amp;charset=GBK&amp;format=json&amp;method=alipay.fund.auth.order.app.freeze&amp;sign=L4wk%2FNKcbJOo3n6Q5qbPzn0jUsvZlK4jr7iXnghudR0zeWJMmeNC71qIBSQfIz45n%2B5iTd0NQ5IK581xI2xCShTCiKAywnQcDmA%2Bjf%2BrRdKCDQCMLfCz%2BZ37C%2B6zxAX3e81%2F8Hr29lw4VPFfHkp9FmMwKw%2FGkNfV5ZlWoh7UtN8%3D&amp;sign_type=RSA&amp;timestamp=2018-05-29+15%3A54%3A35&amp;version=1.0&#039;,\n  success: (res) =&gt; {\n    my.alert({\n    content: JSON.stringify(res),\n  });\n  },\n  fail: (res) =&gt; {\n    my.alert({\n    content: JSON.stringify(res),\n  });\n  }\n});<\/code><\/pre>\n<blockquote>\n<p>orderStr\u4e3apayUrl\u53bb\u6389\u652f\u4ed8\u5b9d\u7f51\u5173\u5730\u5740\u7684\u652f\u4ed8\u4e32<\/p>\n<\/blockquote>\n<h3>uni-app<\/h3>\n<pre><code class=\"language-javascript\">uni.requestPayment({\n    provider: &#039;alipay&#039;,\n    orderStr: &#039;orderStr&#039;, \/\/\u652f\u4ed8\u5b9d\u8ba2\u5355\u6570\u636e\n    success: function (res) {\n        console.log(&#039;success:&#039; + JSON.stringify(res));\n    },\n    fail: function (err) {\n        console.log(&#039;fail:&#039; + JSON.stringify(err));\n    }\n});<\/code><\/pre>\n<blockquote>\n<p>orderStr\u4e3apayUrl\u53bb\u6389\u652f\u4ed8\u5b9d\u7f51\u5173\u5730\u5740\u7684\u652f\u4ed8\u4e32<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0f\u7a0b\u5e8f\u652f\u4ed8\u6587\u6863\uff1ahttps:\/\/opendocs.alipay.com\/mini\/introduce\/pay  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[372],"tags":[],"class_list":["post-1531","post","type-post","status-publish","format-standard","hentry","category-alipay"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1531"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1531\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}