
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
payoo-payment-gateway-test
Advanced tools
The plugin will make it easier to integrate Payoo payments.
The first, Payoo partner must be successfully registered. Use the package manager npm to install.
npm i payoo-payment-gateway
import { PayooPayment } from 'payoo-payment-gateway';
/* HOST_WEBHOOK => Partner API. Used by Payoo to submit payment results by IPN method (server-to-server) method */
const HOST_WEBHOOK = process.env.HOST_WEBHOOK;
/* constructor: username, shopId, shopTitle, checksumKey, endpointCheckout, shopDomain, endpointRefund, apiUsername, apiUserpassword, apiSignature => provided by Payoo*/
class PayooPaymentService {
constructor(username, shopId, shopTitle, checksumKey, endpointCheckout, shopDomain, endpointRefund, apiUsername, apiUserpassword, apiSignature) {
this.payooPayment = new PayooPayment({
username,
shopId,
shopTitle,
checksumKey,
endpointCheckout,
shopDomain,
endpointRefund,
apiUsername,
apiUserpassword,
apiSignature,
})
};
/* The payment method payUrl is returned */
async createPayment({
orderId,
orderNumber,
amount,
returnUrl = 'https://your-website.com',
}) {
try {
const result = await this.payooPayment.createOrderRequest({
orderId,
orderNumber,
amount,
returnUrl,
notifyUrl: HOST_WEBHOOK,
});
return result;
} catch (error) {
console.error(error)
throw error;
}
}
/* Proceed the refund payment */
async refundPayment({ OrderNo, PurchaseDate, Money, Description }) {
try {
const result = await this.payooPayment.refundPayment({
OrderNo,
Money,
Description,
PurchaseDate,
});
return result;
} catch (error) {
console.error(error)
throw error;
}
}
/* The function for verify webhook request and payment */
verifyNotifyData({ ip, xml }) {
try {
const result = this.payooPayment.verifyNotifyData({ ip, xml });
return result;
} catch (error) {
console.error(error)
throw error;
}
}
verifyPayment({ status, session, order_no, checksum, totalAmount, paymentFee }){
try {
const result = this.payooPayment.verifyPayment({status, session, order_no, checksum, totalAmount, paymentFee })
return result;
} catch (error) {
console.error(error)
throw error;
}
}
}
Pull requests are welcome
Mail: thao.pamt@gmail.com Skype: phamanmaithao10@gmail.com Documentation: (https://github.com/pamt0504/payoo-payment-gateway/blob/master/HD%20Tich%20Hop%20Thanh%20Toan%20Payoo_Js_v2.pdf)
FAQs
Payment with payoo Wallet via QR code
The npm package payoo-payment-gateway-test receives a total of 0 weekly downloads. As such, payoo-payment-gateway-test popularity was classified as not popular.
We found that payoo-payment-gateway-test 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
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.