wordpress个人网站添加使用支付宝自助捐款功能
2015-11-25 本文已影响243人
UncleFreak
wordpress个人网站添加使用支付宝自助捐款功能
以wordpress4.3.1为例:
打开网站后台,在外观→编辑里面找到,边栏这个sidebar.php文件,
在这个sidebar.php文件最下面:复制添加支付宝提供的代码如下:
<form action="[https://shenghuo.alipay.com/send/payment/fill.htm](https://shenghuo.alipay.com/send/payment/fill.htm)" method="POST" target="_blank" accept-charset="GBK">
<input name="optEmail" type="hidden" value="你的支付宝账号"/>
<input name="payAmount" type="hidden" value="默认捐赠你的金额"/>
<input id="title" name="title" type="hidden" value="默认的付款说明"/>
<input name="memo" type="hidden" value="默认的备注"/>
<input name="pay" type="image" value="转账" src="[https://img.alipay.com/sys/personalprod/style/mc/btn-index.png](https://img.alipay.com/sys/personalprod/style/mc/btn-index.png)"/></form>
保存就可以了,如果不够美观可以在两边加<center></center>
属性就行了。
下面是预览效果图:

我的博客就是用这个方法。