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.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
YunGouOS Payment SDK: Installation, Usage, and New Features

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 .

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SDKIntegrationpaymentnodejsWeChatAlipay
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.