Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
payoo-payment-gateway-test
Advanced tools
Readme
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
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.