adding readme for future reference
This commit is contained in:
56
README.md
56
README.md
@@ -1,16 +1,52 @@
|
|||||||
# qpay
|
# qpay-peak-flutter
|
||||||
|
|
||||||
A new Flutter project.
|
## Switch from Test to Live Environment
|
||||||
|
|
||||||
## Getting Started
|
This project currently reads runtime API settings from `assets/.env` and loads Mastercard Checkout for web from `web/index.html`.
|
||||||
|
|
||||||
This project is a starting point for a Flutter application.
|
Use the checklist below before building for production.
|
||||||
|
|
||||||
A few resources to get you started if this is your first Flutter project:
|
### 1) Update API and simulation flags (`assets/.env`)
|
||||||
|
|
||||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
In `assets/.env`, make sure the active (uncommented) values are set for live:
|
||||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
|
||||||
|
|
||||||
For help getting started with Flutter development, view the
|
```dotenv
|
||||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
BASE_URL=https://peakapi.qantra.co.zw/api
|
||||||
samples, guidance on mobile development, and a full API reference.
|
SIMULATE_PAYMENT_SUCCESS=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- Keep only one active `BASE_URL` line.
|
||||||
|
- `SIMULATE_PAYMENT_SUCCESS` must be `false` in live to avoid fake-success payment flows.
|
||||||
|
|
||||||
|
### 2) Update Mastercard Checkout script (`web/index.html`)
|
||||||
|
|
||||||
|
In `web/index.html`, switch the checkout script from test to live:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="https://na.gateway.mastercard.com/static/checkout/checkout.min.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
And ensure the test script is not active:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- <script src="https://test-gateway.mastercard.com/static/checkout/checkout.min.js"></script> -->
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3) Quick pre-release verification
|
||||||
|
|
||||||
|
Before release, confirm:
|
||||||
|
- `assets/.env` points to the live API URL.
|
||||||
|
- `assets/.env` has `SIMULATE_PAYMENT_SUCCESS=false`.
|
||||||
|
- `web/index.html` loads `na.gateway.mastercard.com` (not `test-gateway.mastercard.com`).
|
||||||
|
|
||||||
|
## Switch back to Test
|
||||||
|
|
||||||
|
To return to test:
|
||||||
|
- Restore the test `BASE_URL` in `assets/.env`.
|
||||||
|
- Set `SIMULATE_PAYMENT_SUCCESS=true` (only if needed for local testing).
|
||||||
|
- Re-enable the test checkout script in `web/index.html`.
|
||||||
|
|
||||||
|
## Source of Truth
|
||||||
|
|
||||||
|
If environment settings change in future, update this README section together with `assets/.env` and `web/index.html` so release steps stay accurate.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
; BASE_URL=https://peakapi.qantra.co.zw/api
|
BASE_URL=https://peakapi.qantra.co.zw/api
|
||||||
BASE_URL=http://192.168.100.138:6950/api
|
; BASE_URL=http://192.168.100.138:6950/api
|
||||||
; BASE_URL=http://173.212.247.232:6950/api
|
; BASE_URL=http://173.212.247.232:6950/api
|
||||||
; BASE_URL=http://10.69.5.201:6950/api
|
; BASE_URL=http://10.69.5.201:6950/api
|
||||||
; BASE_URL=http://192.168.120.160:6950/api
|
; BASE_URL=http://192.168.120.160:6950/api
|
||||||
@@ -7,5 +7,5 @@ BASE_URL=http://192.168.100.138:6950/api
|
|||||||
; BASE_URL=http://172.20.5.105:6950/api
|
; BASE_URL=http://172.20.5.105:6950/api
|
||||||
; BASE_URL=http://10.10.3.92:6950/api
|
; BASE_URL=http://10.10.3.92:6950/api
|
||||||
CLIENTID=77433712483-ng7pntvcpf6tnjccriuqm8dbna8vvp3b.apps.googleusercontent.com
|
CLIENTID=77433712483-ng7pntvcpf6tnjccriuqm8dbna8vvp3b.apps.googleusercontent.com
|
||||||
; SIMULATE_PAYMENT_SUCCESS=false
|
SIMULATE_PAYMENT_SUCCESS=false
|
||||||
SIMULATE_PAYMENT_SUCCESS=true
|
; SIMULATE_PAYMENT_SUCCESS=true
|
||||||
|
|||||||
@@ -33,11 +33,9 @@
|
|||||||
|
|
||||||
<title>Velocity</title>
|
<title>Velocity</title>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
<!-- <script src="https://na.gateway.mastercard.com/static/checkout/checkout.min.js">-->
|
<script src="https://na.gateway.mastercard.com/static/checkout/checkout.min.js">
|
||||||
<!-- </script>-->
|
|
||||||
<script src="https://test-gateway.mastercard.com/static/checkout/checkout.min.js">
|
|
||||||
</script>
|
</script>
|
||||||
|
<!-- <script src="https://test-gateway.mastercard.com/static/checkout/checkout.min.js"></script> -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function configure(sessionID) {
|
function configure(sessionID) {
|
||||||
Checkout.configure({
|
Checkout.configure({
|
||||||
|
|||||||
Reference in New Issue
Block a user