YunGouOS Payment SDK: Installation, Usage, and New Features
The YunGouOS open‑source payment SDK provides a one‑package solution for integrating WeChat and Alipay payments, offering installation via npm, JavaScript usage examples for synchronous and asynchronous QR code payments, and a list of newly supported interfaces such as WeChat native, face, and refund APIs.
YunGouOS is an open‑source payment SDK based on the official service provider model of WeChat and Alipay, handling account signing and direct settlement with the official platforms.
It integrates WeChat QR code, JSAPI, Mini‑Program payments, order queries, refunds, as well as Alipay QR, WAP, order queries, and refunds, allowing developers to connect with a single package.
Installation (recommended via npm): npm i yungouos-pay-sdk Import the SDK in your project: import { WxPay } from 'yungouos-pay-sdk'; Usage examples:
Synchronous QR code payment:
let result = WxPay.nativePayAsync(out_trade_no, total_fee, mch_id, body, type, attach, notify_url, auto, auto_node, config_no, payKey);
console.log(result);Asynchronous QR code payment:
WxPay.nativePay(out_trade_no, total_fee, mch_id, body, type, attach, notify_url, auto, auto_node, config_no, payKey)
.then(response => {
console.log(response);
});The latest release adds a full JavaScript SDK supporting ten interfaces, including WeChat QR code payment, card payment, face payment, public account payment, cashier payment, H5 payment, APP payment, refund initiation, refund query, and billing statements, all with synchronous and asynchronous calls.
Planned next version features include completing Alipay interface integration, adding WeChat profit‑sharing APIs, and enhancing order API support.
Official documentation is available at https://open.pay.yungouos.com .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
