Skip to content

Commit

Permalink
chore: 📝 update docs and example
Browse files Browse the repository at this point in the history
  • Loading branch information
lehuygiang28 committed Apr 29, 2024
1 parent 3f4b3d0 commit e53eeca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { VNPay } from 'vnpay';
const vnpay = new VNPay({
tmnCode: '2QXUI4B4',
secureSecret: 'secret',
api_Host: 'https://sandbox.vnpayment.vn',
vnpayHost: 'https://sandbox.vnpayment.vn',
testMode: true, // optional
hashAlgorithm: 'SHA512', // optional
});
Expand Down
2 changes: 1 addition & 1 deletion README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { VNPay } from 'vnpay';
const vnpay = new VNPay({
tmnCode: '2QXUI4B4',
secureSecret: 'secret',
api_Host: 'https://sandbox.vnpayment.vn',
vnpayHost: 'https://sandbox.vnpayment.vn',
testMode: true, // optional
hashAlgorithm: 'SHA512', // optional
});
Expand Down
5 changes: 3 additions & 2 deletions example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import crypto from 'crypto';
import { VNPay } from '../src/vnpay';
import { dateFormat } from '../src/utils';
import { ReturnQueryFromVNPay, VerifyReturnUrl } from '../src/types';
import { RefundTransactionType, VnpLocale, VnpOrderType } from '../src/enums';
import { RefundTransactionType, VnpLocale } from '../src/enums';
import { ProductCode } from '../src/constants';

/**
* This function is used to generate secure hash for testing purpose only
Expand Down Expand Up @@ -46,7 +47,7 @@ async function main() {
vnp_IpAddr: '1.1.1.1',
vnp_TxnRef: orderId,
vnp_OrderInfo: '123456',
vnp_OrderType: VnpOrderType.OTHER,
vnp_OrderType: ProductCode.Other,
vnp_ReturnUrl: 'http://localhost:3000/return',
vnp_Locale: VnpLocale.VN,
});
Expand Down

0 comments on commit e53eeca

Please sign in to comment.