Yo yo yo, I've made a mock PIQ integration to get better visibilty on what merchants actually receive from PaymentIQ!
Note that steps 1 and 2 can be skipped if you use docker
- Install NodeJs and make sure it's working (simply write node --version in a console/terminal)
- Make sure NPM was also installed with node, so run
npm --version
. If it isn't installed, install it. Heres a guide - Install ngrok
- Cd into the "mock-piq-integration" directory.
cd my/path/to/mock-piq-integration
- Run
npm install
- Use ngrok to tunnel port 3000 ->
./ngrok http 3000
(note that you'll need to cd to the dir where ngrok was unzipped on mac) - Open the /src directory and the file
config.json
, paste in the HTTPS URL that ngrok gave by changing the current URL that's there - Run
npm run start
in the mock-piq-integration directory -> This will then start the application - Now go to your MID in PaymentIQ --> Admin --> Configuration --> MerchantConfig. Here you will need to change the
integrationService
value tostandardMerchantIntegrationService
and add {YOUR_NGROK_HTTPS_URL_HERE}/api/{action}, example:
<apiIntegrationUrl>https://0094-185-139-247-194.ngrok.io/api/{action}</apiIntegrationUrl>
<integrationService>standardMerchantIntegrationService</integrationService>
With docker all you need to install is ngrok and of course Docker.
- Go into the mock-piq-integraiton directory
cd my/path/to/mock-piq-integration
- Use ngrok to tunnel port 3000 ->
./ngrok http 3000
. If you haven't already you can install it here - Open the /src directory and the file
config.json
, paste in the HTTPS URL that ngrok gave by changing the current URL that's there - Run
docker compose up
if you haven't installed it already you can do that here - Now go to your MID in PaymentIQ --> Admin --> Configuration --> MerchantConfig. Here you will need to change the
integrationService
value tostandardMerchantIntegrationService
and add<apiIntegrationUrl>{YOUR_NGROK_HTTPS_URL_HERE}/api/{action}</apiIntegrationUrl>
, example:
<apiIntegrationUrl>https://0094-185-139-247-194.ngrok.io/api/{action}</apiIntegrationUrl>
<integrationService>standardMerchantIntegrationService</integrationService>
You're now ready to go!
You can no longer configure diffirent users and must change the existing user in responses.json
-
Transfer is only accepted, but the user will NOT actually be updated. This was so that we don't need to have a DB and make the program lighter. It is possible with docker but it's unnececary complication and requires more horsepower and space which everyone might not have on their machines
-
All answers (verifyUser, transfer, authorize, etc) are configurable in responses.json located in the src folder
-
Every time you change any of the reponses you must restart the application
Mock PaymentIQ integration Eddie Englund. Authored by Eddie Englund.
GitHub @TitusEntertainment