lehuygiang28 / vnpay

An open-source nodejs library support to payment with VNPay (vnpay.vn)
https://vnpay.js.org
MIT License
63 stars 26 forks source link

fix(build-url): pass optional gateway enpoint when build url #5

Closed thinhbuihong closed 6 months ago

thinhbuihong commented 6 months ago

**Description

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

The PR related issues or references:

lehuygiang28 commented 6 months ago

Nice, but I think we should change the name of this to something like PAYMENT_ENDPOINT for greater clarity

thinhbuihong commented 6 months ago

Nice, but I think we should change the name of this to something like PAYMENT_ENDPOINT for greater clarity

I think the parameter should not be named upper snake case, so can I rename it gatewayEndPoint?

lehuygiang28 commented 6 months ago

I think the parameter should not be named upper snake case, so can I rename it gatewayEndPoint?

Yeah, sure. I mean, you can change both the new and the old constants from GATEWAY_ENDPOINT to PAYMENT_ENDPOINT. Do you think payment is clearer than gateway?

GATEWAY_ENDPOINT -> PAYMENT_ENDPOINT endPoint -> paymentEndpoint

thinhbuihong commented 6 months ago

@lehuygiang28 I have renamed the old constant