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.
GoCrypto integration
We have integrated GoCrypto payments into the Bitcoin.com Wallet.
HOW IT WORKS:
Step 1. On user QR code scan, wallet checks if payload type is GoCrypto. If the payload is not GoCrypto then it continues to Step 3.
Step 2. With GoCrypto payload wallet calls GoCrypto's endpoint to get payment details and checks if the payment is valid. Payment details are returned as payload.
Step 3. Wallet parses payload and continues to the next screen where payment confirmation is shown.
Step 4. When a user approves payment, wallet checks if the payment provider is GoCrypto. If the payment provider is not GoCrypto it continues to Step 6.
Step 5. Wallet calls GoCrypto's endpoint to verify if payment is still valid (not cancelled). If payment is still valid it continues to Step 6 else goes back to Step 1.
Step 6. Payment is completed.
IMPLEMENTATION NOTES:
redir(data, cbError)
insrc/js/services/incoming-data.service.js
to our function that checks and updates received payload.approve()
and move existing approve function to new function_onApprove()
insrc/js/controllers/review.controller.js
.