Blog
Introduce other payment methods by mail after placing an order in woocommerce
There is an old customer who uses wordpress as a foreign trade station. Because the product involves copyright issues, he dares not use the normal Paypal standard to collect money, but uses encrypted paypal to receive payment. After encryption, paypal cannot trace the source, so the customer cannot refund payment.
The thought process of payment:
1. When the user adds to the shopping cart, checkout and select offline payment (bank transfer)

2. At this time, the order is reserved in the background

3. An email that will automatically trigger the "order reservation" will be sent to the customer

4. The customer clicks the payment through the link in the email, which successfully leads the customer to the encrypted Paypal payment channel.
At this point, one thing we need is to modify the woocommerce email order details template and add a dynamic amount interface to the Paypal payment link
Modify the email template
/wp-content/plugins/woocommerce/templates/emails/email-order-details.php
Get the total amount of the order, dynamic interface
get_total()); ?>
xxxx%40gmail.com 是Paypal收款账户,需要修改
USD currency
handbag product name
Add a custom button link where you want to display
<a href=”https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=xxxx%40gmail.com&amount= get_total()); ?>&currency_code=USD&item_name=handbag&item_number=&quantity=1&shipping=0.00&no_shipping=0&pbtype=product&bn=paywiz0105xx-px”>点击付款</a>
常见问题(FAQ)
下单后怎么把客户引到别的付款方式?
让客户选择线下支付下单,订单保留在后台,系统发出订单保留邮件,再在邮件模板里加自定义付款按钮。
结论
这套做法把付款环节从结账页挪到邮件里,改动集中在邮件模板和链接参数,不必动结账流程。