Skip to content
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

PR: offer virtual cards by user location #270

Merged
merged 16 commits into from
Aug 15, 2024
Merged

Conversation

EresDev
Copy link
Contributor

@EresDev EresDev commented Jul 26, 2024

Resolves #259

QA

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Jul 26, 2024

package.json Show resolved Hide resolved
@EresDev
Copy link
Contributor Author

EresDev commented Aug 2, 2024

Right now, Reloadly API and sandbox have started to behave unexpectedly, probably because they are going through some fixes or maintenance. So cards are not loading on their production API. Also, the data is inconsistent between their sandbox API and sandbox dashboard. Here, we wait while they fix their issues. I will keep an eye on their API and sandbox.

should prevent mixing of other gift cards with keyhwords visa mastercard
@EresDev
Copy link
Contributor Author

EresDev commented Aug 2, 2024

What's included in this PR:

  • remove fixed price products, and offer only variable price products
  • offer virtual cards by user location (here we detect location by user's IP. If IP location request to API fails, we use user's timezone as fallback)
  • remove "also available in" price section from card details in the UI

QA

For user from US

US

For user from Canada

canada

For user from Germany

Germany

@rndquu
Copy link
Member

rndquu commented Aug 5, 2024

@EresDev How to QA this PR?

  1. Set RELOADLY_API_CLIENT_ID and RELOADLY_API_CLIENT_SECRET here
  2. Run yarn start

Correct?

@EresDev
Copy link
Contributor Author

EresDev commented Aug 5, 2024

@EresDev How to QA this PR?

@rndquu You probably want to do it on anvil testnet.

  1. Set USE_RELOADLY_SANDBOX, RELOADLY_API_CLIENT_ID and RELOADLY_API_CLIENT_SECRET here
  2. set .env vars for permit if you need a permit URL (cards will only show if the amount can buy an available card. 50$ is safe bet)
  3. run following
yarn test:anvil
yarn test:fund
yarn build
  1. Run yarn start

For mainet,

  1. Set USE_RELOADLY_SANDBOX, RELOADLY_API_CLIENT_ID and RELOADLY_API_CLIENT_SECRET here
  2. set .env vars for permit if you need a permit URL
  3. You also want to change the treasury address where token paid for virtual card are received. (maybe we should move it to env var. I will try to do that next)
  4. run following
yarn build
  1. Run yarn start

The preview deploy above should have showed cards if the permit amount was not 0. It would have been easy for QA. I will look into increasing the permit amount after checking if it is safe to do so.

Also, if you use Reloadly sandbox, then it has only 1 visa card for US. There is no other visa/mastercard. Relaodly production has more cards. You can make combination of Reloadly sandbox or production with anvil fork or mainnet as you like.

@rndquu rndquu self-requested a review August 7, 2024 07:21
@rndquu
Copy link
Member

rndquu commented Aug 7, 2024

@EresDev Could you review EresDevOrg#1 ?

@rndquu
Copy link
Member

rndquu commented Aug 7, 2024

@EresDev I managed to run it with production credentials for US. There are no cards displayed in a sandbox environment for US because there is only 1 card available and it is fixed price while we support only range cards, correct?

@EresDev
Copy link
Contributor Author

EresDev commented Aug 7, 2024

@EresDev I managed to run it with production credentials for US. There are no cards displayed in a sandbox environment for US because there is only 1 card available and it is fixed price while we support only range cards, correct?

Correct.

build: set USE_RELOADLY_SANDBOX to a string
@EresDev
Copy link
Contributor Author

EresDev commented Aug 14, 2024

Am I supposed to merge this as the reviews appear to be finished? This is getting merged into beta branch for your info. @0x4007 @rndquu

@EresDev EresDev linked an issue Aug 15, 2024 that may be closed by this pull request
@EresDev EresDev merged commit 68060db into ubiquity:beta Aug 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify virtual cards - offer only supported cards for user location
4 participants