给WordPress网站添加支付宝一键转账的功能

前端之家收集整理的这篇文章主要介绍了给WordPress网站添加支付宝一键转账的功能前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

PayPal有一个非常实用的功能,那就是一键转账。很多个人站长,当使用wordpress建站完成以后,想要给网站添加支付宝捐赠的功能。今天我们就介绍一个简单的方法来实现支付宝一键转账的功能,原理是制作一个 form 表单,经过 POST 可以一键自动填写「支付宝转账页面」的信息,这样就可以让大家更方便、更快捷的转账捐赠给个人站长。

代码如下:

Crayon-5c891d3300af8926111368" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891d3300af8926111368-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d3300af8926111368-2">2
Crayon-num" data-line="Crayon-5c891d3300af8926111368-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d3300af8926111368-4">4
Crayon-num" data-line="Crayon-5c891d3300af8926111368-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891d3300af8926111368-6">6
Crayon-num" data-line="Crayon-5c891d3300af8926111368-7">7
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891d3300af8926111368-1">Crayon-o"><Crayon-e">form Crayon-v">actionCrayon-o">=Crayon-s">"https://shenghuo.alipay.com/send/payment/fill.htm"Crayon-h"> Crayon-v">methodCrayon-o">=Crayon-s">"POST"Crayon-h"> Crayon-v">targetCrayon-o">=Crayon-s">"_blank"Crayon-h"> Crayon-v">acceptCrayon-o">-Crayon-v">charsetCrayon-o">=Crayon-s">"GBK"
Crayon-line Crayon-striped-line" id="Crayon-5c891d3300af8926111368-2">Crayon-o"><Crayon-e">input Crayon-v">nameCrayon-o">=Crayon-s">"optEmail"Crayon-h"> Crayon-v">typeCrayon-o">=Crayon-s">"hidden"Crayon-h"> Crayon-v">valueCrayon-o">=Crayon-s">"你的支付宝账号"Crayon-h"> Crayon-o">/
Crayon-line" id="Crayon-5c891d3300af8926111368-3">Crayon-o"><Crayon-e">input Crayon-v">nameCrayon-o">=Crayon-s">"payAmount"Crayon-h"> Crayon-v">typeCrayon-o">=Crayon-s">"hidden"Crayon-h"> Crayon-v">valueCrayon-o">=Crayon-s">"默认的捐赠金额"Crayon-h"> Crayon-o">/
Crayon-line Crayon-striped-line" id="Crayon-5c891d3300af8926111368-4">Crayon-o"><Crayon-e">input Crayon-v">idCrayon-o">=Crayon-s">"title"Crayon-h"> Crayon-v">nameCrayon-o">=Crayon-s">"title"Crayon-h"> Crayon-v">typeCrayon-o">=Crayon-s">"hidden"Crayon-h"> Crayon-v">valueCrayon-o">=Crayon-s">"默认显示的付款说明"Crayon-h"> Crayon-o">/
Crayon-line" id="Crayon-5c891d3300af8926111368-5">Crayon-o"><Crayon-e">input Crayon-v">nameCrayon-o">=Crayon-s">"memo"Crayon-h"> Crayon-v">typeCrayon-o">=Crayon-s">"hidden"Crayon-h"> Crayon-v">valueCrayon-o">=Crayon-s">"备注"Crayon-h"> Crayon-o">/
Crayon-line Crayon-striped-line" id="Crayon-5c891d3300af8926111368-6">Crayon-o"><Crayon-e">input Crayon-v">nameCrayon-o">=Crayon-s">"pay"Crayon-h"> Crayon-v">typeCrayon-o">=Crayon-s">"image"Crayon-h"> Crayon-v">valueCrayon-o">=Crayon-s">"转账"Crayon-h"> Crayon-v">srcCrayon-o">=Crayon-s">"https://img.alipay.com/sys/personalprod/style/mc/btn-index.png"Crayon-h"> Crayon-o">/
Crayon-line" id="Crayon-5c891d3300af8926111368-7">Crayon-o"><Crayon-o">/Crayon-v">form

效果如下:


猜你在找的wordpress相关文章