Skip to content

eddie-englund/mock-piq-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock PIQ integration

Yo yo yo, I've made a mock PIQ integration to get better visibilty on what merchants actually receive from PaymentIQ!

Prerequisites

Note that steps 1 and 2 can be skipped if you use docker

  1. Install NodeJs and make sure it's working (simply write node --version in a console/terminal)
  2. Make sure NPM was also installed with node, so run npm --version. If it isn't installed, install it. Heres a guide
  3. Install ngrok
  4. Cd into the "mock-piq-integration" directory. cd my/path/to/mock-piq-integration
  5. Run npm install
  6. 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)
  7. 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
  8. Run npm run start in the mock-piq-integration directory -> This will then start the application
  9. Now go to your MID in PaymentIQ --> Admin --> Configuration --> MerchantConfig. Here you will need to change the integrationService value to standardMerchantIntegrationService 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

With docker all you need to install is ngrok and of course Docker.

  1. Go into the mock-piq-integraiton directory cd my/path/to/mock-piq-integration
  2. Use ngrok to tunnel port 3000 -> ./ngrok http 3000. If you haven't already you can install it here
  3. 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
  4. Run docker compose up if you haven't installed it already you can do that here
  5. Now go to your MID in PaymentIQ --> Admin --> Configuration --> MerchantConfig. Here you will need to change the integrationService value to standardMerchantIntegrationService 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!

Configuring diffirent users

You can no longer configure diffirent users and must change the existing user in responses.json

Important notes

  • 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

About

A mock integration to PIQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published