-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create .env.example #452
Open
Juma-creator
wants to merge
6
commits into
pi-apps:master
Choose a base branch
from
Juma-creator:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Create .env.example #452
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a random string, or roll your face on the keyboard to fill this value: SESSION_SECRET=https://paywithpi.com/Validation-key.txt # Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=1b7af176827adb2cd0daa1edfc56bace7261b49819e430f2e38dc2070b7c01814e0e21cddc438714435b4fa1aacca00479132c6edb9d15baaf46796a3a44d6f3 # Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=f7d8531b796b28a6223d7045dc9e437cc6f1a8b07932db982885dc293f6855d55c8cd09739ab0f2e24b74797ee5dbb5a999eba3e602b0d69304f1c3df0eb6ed0 # Platform API PLATFORM_API_URL=https://api.minepi.com # MongoDB database connection details: MONGO_HOST=localhost:27017 MONGODB_DATABASE_NAME=Pay with Piapp-development MONGODB_USERNAME=Pay with Piapp MONGODB_PASSWORD=dev_password # Frontend app URL FRONTEND_URL=http://localhost:3314
# Generate a random string, or roll your face on the keyboard to fill this value: SESSION_SECRET=https://paywithpi.com/Validation-key.txt # Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=1b7af176827adb2cd0daa1edfc56bace7261b49819e430f2e38dc2070b7c01814e0e21cddc438714435b4fa1aacca00479132c6edb9d15baaf46796a3a44d6f3 # Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=f7d8531b796b28a6223d7045dc9e437cc6f1a8b07932db982885dc293f6855d55c8cd09739ab0f2e24b74797ee5dbb5a999eba3e602b0d69304f1c3df0eb6ed0 # Platform API PLATFORM_API_URL=https://api.paywithpi.com # MongoDB database connection details: MONGO_HOST=localhost:27017 MONGODB_DATABASE_NAME=paywithpiapp-development MONGODB_USERNAME=paywithpiapp MONGODB_PASSWORD=dev_password # Frontend app URL FRONTEND_URL=http://localhost:3314
process.env.MY_VARIABLE = 'my_value'; console.log(process.env.MY_VARIABLE); // Outputs: my_value version: '3' services: app: environment: - MY_VARIABLE=my_value console.log(process.env.MY_VARIABLE); // Outputs: my_value
<script src="https://sdk.minepi.com/pi-sdk.js"></script> <script>Pi.init({ version: "2.0" })</script> // Authenticate the user, and get permission to request payments from them: const scopes = ['payments']; // Read more about this callback in the SDK reference: function onIncompletePaymentFound(payment) { /* ... */ }; Pi.authenticate(scopes, onIncompletePaymentFound).then(function(auth) { console.log(`Hi there! You're ready to make payments!`); }).catch(function(error) { console.error(error); }); Pi.createPayment({ // Amount of π to be paid: amount: 3.14, // An explanation of the payment - will be shown to the user: memo: "...", // e.g: "Digital kitten #1234", // An arbitrary developer-provided metadata object - for your own usage: metadata: { /* ... */ }, // e.g: { kittenId: 1234 } }, { // Callbacks you need to implement - read more about those in the detailed docs linked below: onReadyForServerApproval: function(paymentId) { /* ... */ }, onReadyForServerCompletion: function(paymentId, txid) { /* ... */ }, onCancel: function(paymentId) { /* ... */ }, onError: function(error, payment) { /* ... */ }, });
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generate a random string, or roll your face on the keyboard to fill this value: SESSION_SECRET=https://paywithpi.com/Validation-key.txt
Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=1b7af176827adb2cd0daa1edfc56bace7261b49819e430f2e38dc2070b7c01814e0e21cddc438714435b4fa1aacca00479132c6edb9d15baaf46796a3a44d6f3 # Get this on the Pi Developer Portal (develop.pi in the Pi Browser) PI_API_KEY=f7d8531b796b28a6223d7045dc9e437cc6f1a8b07932db982885dc293f6855d55c8cd09739ab0f2e24b74797ee5dbb5a999eba3e602b0d69304f1c3df0eb6ed0
Platform API
PLATFORM_API_URL=https://api.PaywithPi.com
MongoDB database connection details:
MONGO_HOST=localhost:27017
MONGODB_DATABASE_NAME=Pay with Piapp-development
MONGODB_USERNAME=Pay with Piapp
MONGODB_PASSWORD=dev_password
Frontend app URL
FRONTEND_URL=http://localhost:3314