PayU is one of the widely accepted payment gateways for online payment integration especially in India and other countries like Poland, Brazil, SouthAfrica and Turkey. It might be interesting for you if you are having your website made in GoLang and looking for integrating Payu it as it might be even more simple for you with this repository.
It is a well managed repository, using which one can integrate PayU in their GoLang Website in quick simple steps once they get PayU Merchant Key from PayU official website.
- Create a merchant account in PayU.
- Get PAYU_MERCHANT_KEY which will be get once the onboarding process is completed.
- Set Up Merchant Key got from above process
Provide the value for PAYU_MERCHANT_KEY in .env file
#PayU Payment sandbox details
merchant_key_stage = "XXXXXXXXX"
merchant_salt_stage = "XXXXXXX"
redirect_url_stage = `https://test.payu.in/_payment`
#PayU Payment Production details
merchant_key = "XXXXXXXXX"
merchant_salt = "XXXXXXXX"
redirect_url = `https://secure.payu.in/_payment`
PAYMENT_MIDDLEWARE_URL = `http://localhost/payu.php`
- Verify Checksum Hash for successful transactions.
A checksum hash is generated by the payu which is verified on merchant server for successful transaction. For this there is a file payu.go which need to be copied to your local as it works for generation and verification of checksum.
- Set Mode
PayU integration can be done in two stages i.e. staging and production modes have different PayU transaction urls.
- In staging mode we are using sandbox details for testing the payU working
Staging mode transaction url
https://test.payu.in/_payment
- If you are using production mode means it accepts original details of payU
Production mode transaction url
https://secure.payu.in/_payment
PayU integration using Golang is MIT-licensed
We’d be really happy if you sent us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.