{"id":601,"date":"2026-04-09T07:58:54","date_gmt":"2026-04-08T23:58:54","guid":{"rendered":"https:\/\/nestpi.com\/?page_id=601"},"modified":"2026-04-09T07:58:54","modified_gmt":"2026-04-08T23:58:54","slug":"online-payment","status":"publish","type":"page","link":"https:\/\/nestpi.com\/?page_id=601","title":{"rendered":"\u5728\u7ebf\u6536\u6b3e"},"content":{"rendered":"<p>\u6b22\u8fce\u4f7f\u7528 NestPi \u5728\u7ebf\u6536\u6b3e\u7cfb\u7edf\u3002<\/p>\n\t<div class=\"nestpi-pay-wrap\">\n\t\t<h2>\u5728\u7ebf\u6536\u6b3e\u7cfb\u7edf<\/h2>\n\t\t<p>\u63d0\u4ea4\u652f\u4ed8\u610f\u5411\u540e\u4f1a\u81ea\u52a8\u540c\u6b65\u5230\u5ba2\u670d\u624b\u673a\uff08MQTT \u63a8\u9001\uff09\uff0c\u4fbf\u4e8e\u5feb\u901f\u786e\u8ba4\u3002<\/p>\n\t\t<form id=\"nestpi-pay-form\" class=\"nestpi-pay-form\">\n\t\t\t<input name=\"name\" type=\"text\" placeholder=\"\u59d3\u540d\/\u516c\u53f8\u540d\u79f0\" required \/>\n\t\t\t<input name=\"phone\" type=\"text\" placeholder=\"\u8054\u7cfb\u7535\u8bdd\/\u5fae\u4fe1\" required \/>\n\t\t\t<input name=\"email\" type=\"email\" placeholder=\"\u90ae\u7bb1\uff08\u53ef\u9009\uff09\" \/>\n\t\t\t<input name=\"amount\" type=\"number\" step=\"0.01\" min=\"0.01\" placeholder=\"\u4ed8\u6b3e\u91d1\u989d\uff08CNY\uff09\" required \/>\n\t\t\t<select name=\"method\">\n\t\t\t\t<option value=\"wechat\">\u5fae\u4fe1\u6536\u6b3e<\/option>\n\t\t\t\t<option value=\"alipay\">\u652f\u4ed8\u5b9d\u6536\u6b3e<\/option>\n\t\t\t\t<option value=\"bank\">\u94f6\u884c\u8f6c\u8d26<\/option>\n\t\t\t\t<option value=\"manual\">\u4eba\u5de5\u786e\u8ba4<\/option>\n\t\t\t<\/select>\n\t\t\t<textarea name=\"note\" rows=\"3\" placeholder=\"\u8ba2\u5355\u5907\u6ce8\uff08\u4ea7\u54c1\u578b\u53f7\u3001\u6570\u91cf\u3001\u7528\u9014\u7b49\uff09\"><\/textarea>\n\t\t\t<button type=\"submit\">\u63d0\u4ea4\u652f\u4ed8\u610f\u5411<\/button>\n\t\t\t<div id=\"nestpi-pay-result\" class=\"nestpi-pay-result\"><\/div>\n\t\t<\/form>\n\t\t<div class=\"nestpi-pay-info\">\n\t\t\t<p><strong>\u4ed8\u6b3e\u8bf4\u660e\uff1a<\/strong>\u63d0\u4ea4\u540e\u8bf7\u6309\u9875\u9762\u6307\u5f15\u5b8c\u6210\u4ed8\u6b3e\uff0c\u5e76\u4fdd\u7559\u4ed8\u6b3e\u622a\u56fe\u4ee5\u4fbf\u5ba2\u670d\u5feb\u901f\u786e\u8ba4\u3002<\/p>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t<\/div>\n\t<style>\n\t.nestpi-pay-wrap{max-width:760px;margin:24px auto;padding:24px;border:1px solid #dbe4f0;border-radius:16px;background:#fff;box-shadow:0 14px 35px rgba(0,0,0,.08)}\n\t.nestpi-pay-wrap h2{margin:0 0 8px;font-size:30px}\n\t.nestpi-pay-form{display:grid;gap:12px;margin-top:14px}\n\t.nestpi-pay-form input,.nestpi-pay-form select,.nestpi-pay-form textarea{padding:12px;border:1px solid #ccd8ea;border-radius:10px}\n\t.nestpi-pay-form button{background:#0a84ff;color:#fff;padding:12px 16px;border:none;border-radius:10px;font-weight:700;cursor:pointer}\n\t.nestpi-pay-result{font-size:13px;line-height:1.5;color:#111827;min-height:20px}\n\t.nestpi-pay-info{margin-top:16px;padding-top:12px;border-top:1px dashed #ccd8ea;font-size:14px}\n\t<\/style>\n\t<script>\n\t(function(){\n\t\tconst form=document.getElementById('nestpi-pay-form');\n\t\tconst result=document.getElementById('nestpi-pay-result');\n\t\tif(!form||!result){return;}\n\t\tform.addEventListener('submit',async(e)=>{\n\t\t\te.preventDefault();\n\t\t\tresult.textContent='\u63d0\u4ea4\u4e2d...';\n\t\t\tconst fd=new FormData(form);\n\t\t\tfd.append('action','nestpi_submit_payment');\n\t\t\tfd.append('nonce','cc3df39875');\n\t\t\ttry{\n\t\t\t\tconst res=await fetch('https:\/\/nestpi.com\/wp-admin\/admin-ajax.php',{method:'POST',body:fd,credentials:'same-origin'});\n\t\t\t\tconst data=await res.json();\n\t\t\t\tif(!data.success){throw new Error(data.data&&data.data.message?data.data.message:'\u63d0\u4ea4\u5931\u8d25');}\n\t\t\t\tresult.textContent='\u5df2\u63d0\u4ea4\u3002\u8ba2\u5355\u53f7\uff1a'+data.data.order_no+'\uff1b\u65b9\u5f0f\uff1a'+data.data.method+'\u3002'+(data.data.extra||'');\n\t\t\t\tform.reset();\n\t\t\t}catch(err){\n\t\t\t\tresult.textContent='\u63d0\u4ea4\u5931\u8d25\uff1a'+err.message;\n\t\t\t}\n\t\t});\n\t})();\n\t<\/script>\n\t\n","protected":false},"excerpt":{"rendered":"<p>\u6b22\u8fce\u4f7f\u7528 NestPi \u5728\u7ebf\u6536\u6b3e\u7cfb\u7edf\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-601","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nestpi.com\/index.php?rest_route=\/wp\/v2\/pages\/601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nestpi.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nestpi.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/nestpi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=601"}],"version-history":[{"count":0,"href":"https:\/\/nestpi.com\/index.php?rest_route=\/wp\/v2\/pages\/601\/revisions"}],"wp:attachment":[{"href":"https:\/\/nestpi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}