
Security News
Feross on TBPN: Socket's Series C and the State of Software Supply Chain Security
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.
@foxit/pay-layer
Advanced tools
npm i @foxit/pay-layer -S
// main.js
import payLayer from '@foxit/pay-layer'
import '@foxit/pay-layer/npm_pay_layer.css'
Vue.use(payLayer)

其中goodsDetails、tips和userData为必填, 其他参数为微信请求预支付后得到的参数。
<pay-layer
v-if="showPay"
@closePayLayer="showPay = false"
@createPreVIPOrder="createPreVIPOrder"
@checkWxPay="checkWxPay"
@reChoosePayWay="reChoosePayWay"
:goodsDetails="details"
:tips="tips"
:userData="userData"
:orderNum="orderNum"
:WXQRCode="WXQRCode"
:payUnfinished="payUnfinished"
/>
tips: [
{
"title":"购买说明",
"list":[
"本内容为正版电子图书,虚拟物品付费之后概不接收任何退款。",
"本内容只支持在线阅读,不支持下载。"
]
}
]
userData: {
"userId":900038694,
"nickName":"cxx",
"figure1":"http://thirdwx.qlogo.cn/mmopen/ajNicQQ/132","openIdType":"weixin",
"tel":null,
"email":null
}
goodsDetails: {
"title":"我的中国故事:海外学者的中国缘",
}
WXQRCode:"http://foxit-common.s3.cn-north-1.amazonaws.com.cn/foxit-vip/qrCode/aee101c6f0e541eeb609e96021b466d3"
orderNum:"muban16363510937359000386945"
payUnfinished:false
@closePayLayer 第一幕点击右上角关闭图标触发的回调。
@createPreVIPOrder="createPreVIPOrder" 第一幕点击立即支付触发的回调
@checkWxPay="checkWxPay" 第二幕点击付款完成触发的回调
@reChoosePayWay="reChoosePayWay" 第二幕点击重新选择支付方式
reChoosePayWay() {
this.WXQRCode = "";
this.payUnfinished = false;
},
checkWxPay(e) {
console.log(e);
const params = {
user_id: this.userId,
product_id: this.id
};
isPay(params).then(res => {
if (res.message == "已购买") {
this.$router.go(0);
}
if (res.message == "未购买" && e == 1) {
this.payUnfinished = true;
}
});
},
createPreVIPOrder(payway) {
if (!this.userId) {
localStorage.removeItem("userInfo");
window.location.href = `https://muban.pdf365.cn/login_cb?cb=${encodeURIComponent(
window.location.href
)}`;
return false;
}
if (payway === 0) {
const params = {
payType: payway === 0 ? 2 : 1,
amount: 1,
preId: this.preId,
extra: this.extra || null,
orderFrom: this.orderFrom,
returnUrl: encodeURIComponent(window.location.href)
};
// 微信支付
createPreVIPOrder(params).then(res => {
console.log(res);
if (res.ret === 0) {
this.WXQRCode = res.data.img;
this.orderNum = res.data.order_num;
setInterval(this.checkWxPay, 3000);
}
});
} else {
window.location.href =
"https://vip.foxitreader.cn/preOrder/createPreVIPOrder?payType=1&amount=1&preId=" +
this.preId +
"&extra=" +
this.extra +
"&orderFrom=" +
this.orderFrom +
"&returnUrl=" +
encodeURIComponent(window.location.href);
}
},

tips
FAQs
``` npm i @foxit/pay-layer -S ```
The npm package @foxit/pay-layer receives a total of 19 weekly downloads. As such, @foxit/pay-layer popularity was classified as not popular.
We found that @foxit/pay-layer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.

Security News
OSV withdrew 157 OSV malware reports after automated false positives incorrectly flagged trusted npm and PyPI packages, sending bad records into tools that rely on OSV data.

Research
/Security News
TrapDoor crypto stealer hits 36 malicious packages across npm, PyPI, and Crates.io, targeting crypto, DeFi, AI, and security developers.