云服务厂商diylink绑定信用卡送200美金,但每日存在限量的服务器,本文档用于帮助0元订单支付。
上车需谨慎!小心被套卡
自动支付脚本
脚本名称diylink.sh
F12通过接口获取token,并且填写订单ID
脚本内容如下:
#!/bin/bash
# diylink自动支付订单
# Author: admin@lolicp.com
# Date: 2024-05-03
# F12获取对应接口的token
Token='asda439e69zd69c0b36c5cdd89232c2Hx7MsY'
# 订单ID
Order_Id='9999'
curl -X PUT -H 'Content-Type: application/json;charset=UTF-8' -H 'Origin: https://console.diylink.net' -H "Referer: https://console.diylink.net/settlement/pay?code=${Order_Id}&url=/virtual-machine/create/${Order_Id}®ion_id=24&platform=diylink" -H "Token: ${Token}" -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' -d '{"discount_type":"gift","coupon_code":"","order_id":"'${Order_Id}'","payment":"cash_balance","return_url":"/settlement/order"}' https://console.diylink.net/api/user/settlement/order-pay
添加定时任务
根据实际情况调整每几分钟执行一次,不建议太频繁。
*/10 * * * * /bin/bash /root/diylink.sh >> /tmp/temp_lolicp.log 2>&1