Closed lehuygiang28 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vnpay | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 26, 2024 7:24am |
This update introduces significant changes and additions to the VNPay integration documentation and codebase. Key enhancements include a new parameter for specifying bank codes in payment URLs, a detailed guide on retrieving bank lists, and a comprehensive API for processing refunds. The documentation has been restructured, with metadata adjustments and new content for improved clarity and usability.
Files/Groups | Change Summary |
---|---|
docs/docs/02_installation.md |
Removed metadata sidebar_position: 2 and adjusted heading structure. |
docs/docs/03_get-bank-list.md |
Added new file detailing the retrieval and properties of bank lists for vnp_BankCode . |
docs/docs/04_create-payment-url.md |
Added vnp_BankCode parameter to buildPaymentUrl function. |
docs/docs/05_ipn/01_config-ipn.md |
Removed metadata and refined IPN URL setup content. |
docs/docs/05_ipn/02_verify-ipn-call.md |
Removed metadata, adjusted links, and refined IPN verification content. |
docs/docs/05_ipn/_category_.json |
Introduced JSON configuration for IPN module, defining label and collapsible behavior. |
docs/docs/06_verify-return-url.md |
Removed metadata and focused on verifying return URL post-payment. |
docs/docs/07_query-dr.md |
Removed metadata and restructured heading for querying transaction results. |
docs/docs/08_refund.md |
Added new file introducing refund API, detailing refund transaction initiation and properties. |
docs/docs/20_examples.md |
Removed metadata and restructured document, removing unnecessary lines. |
src/types/index.ts |
Added new types QueryDrResponseFromVNPay , RefundResponse , RefundResponseFromVNPay , and bank . |
src/types/refund.type.ts |
Modified Refund and RefundResponse types, introduced RefundResponseLogger and RefundOptions . |
src/utils/common.ts |
Enhanced generateRandomString to include an optional onlyNumber flag. |
src/vnpay.ts |
Added new types and modified refund method to accept additional parameters, enhanced processing. |
sequenceDiagram
participant User
participant VNPayAPI
participant BankListService
participant RefundService
User->>VNPayAPI: Request to build payment URL with vnp_BankCode
VNPayAPI->>BankListService: Retrieve bank list
BankListService-->>VNPayAPI: Return bank list
VNPayAPI-->>User: Provide payment URL
User->>VNPayAPI: Request refund
VNPayAPI->>RefundService: Process refund request
RefundService-->>VNPayAPI: Refund response
VNPayAPI-->>User: Provide refund response
[!TIP]
Early Access Features
- Sequence Diagrams in the Walkthrough
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
buildPaymentUrl
function to include a new parameter for specifying bank codes.Improvements
Bug Fixes
Chores