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

Pick & offer the single best virtual card to user #273

Closed
EresDev opened this issue Aug 6, 2024 · 16 comments · Fixed by #277
Closed

Pick & offer the single best virtual card to user #273

EresDev opened this issue Aug 6, 2024 · 16 comments · Fixed by #277

Comments

@EresDev
Copy link
Contributor

EresDev commented Aug 6, 2024

Currently, the virtual card feature is offering all visa & mastercard to users based on their location.

As discussed in #259 (comment) and #259 (comment), pick and offer only single virtual card to the user.

Important files

How to pick the best card for a user?

  • offer only mastercard from MasterCard International.xlsx because they are tokenized.
  • pick the card SKU based on user's location.
  • offer mastercard SKU 18597 to users who are not in the MasterCard International.xlsx, but present in the MC allow list 3052024.xlsx.
  • We probably will not fetch a product list from Reloadly anymore. Presence of this previously was taking care of not offering card to users out of MC allow list 3052024.xlsx. If so, make sure user's country is in the MC allow list 3052024.xlsx before offering them a mastercard.

Please note that the virtual cards feature is present in beta branch at the moment. But it can move to development branch anytime. So, keep an eye on that and open a PR accordingly.

Copy link

ubiquibot bot commented Aug 6, 2024

@EresDev, You are not allowed to add Time: <1 Week

Copy link

ubiquibot bot commented Aug 6, 2024

! No permission to set labels

@0x4007
Copy link
Member

0x4007 commented Aug 6, 2024

I imagine that the initial set up would have taken longer, how come this iterative feature is estimated to take a week compared to a day?

@EresDev
Copy link
Contributor Author

EresDev commented Aug 7, 2024

I imagine that the initial set up would have taken longer, how come this iterative feature is estimated to take a week compared to a day?

The initial setup was easier. Reloadly API was doing most of the things for us. This is going to take a little more time. 2-3 days I estimate as we are using a custom formula pick a card and data source isn't just the API anymore. We have to read these files or turn them into json.

Free free to adjust the estimate of the initial setup or this, and let me know if I should label the time differently.

@rndquu
Copy link
Member

rndquu commented Aug 7, 2024

We probably will not fetch a product list from Reloadly anymore.

Why not? I mean the flow for picking up the "best" card could be:

  1. Fetch user country
  2. If user country is in MasterCard International.xlsx then use card from that list
  3. If user country is in MC allow list 3052024.xlsx the use card 18597
  4. Otherwise use reloadly API to fetch available range cards

@EresDev
Copy link
Contributor Author

EresDev commented Aug 7, 2024

  1. Otherwise use reloadly API to fetch available range cards

I see this is the step where we would need to fetch the product list. This step will be unnecessary because there wouldn't be any card for a country that is not in the allow list. We are not offering visa, we are offering only mastercard. But even if we were offering visa, the allowed country list for mastercard and visa contains exactly the same countries.

Only case I can think this would be useful is when the mastercard is out of stock for user and we offer them another non-tokenized mastercard or visa with limitations. Here, we also have another problem of again picking a card from this list. We don't have solid rules to pick one. Maybe choose randomly? I don't plan to support this. Let me know if you think we should support this.

Also, please note that I will need product details and for that I am thinking to use single product details API route. But if I find loading product list to be more useful, I will go with that. So, it is not a final decision to not load product list.

@rndquu
Copy link
Member

rndquu commented Aug 7, 2024

  1. Otherwise use reloadly API to fetch available range cards

I see this is the step where we would need to fetch the product list. This step will be unnecessary because there wouldn't be any card for a country that is not in the allow list. We are not offering visa, we are offering only mastercard. But even if we were offering visa, the allowed country list for mastercard and visa contains exactly the same countries.

Only case I can think this would be useful is when the mastercard is out of stock for user and we offer them another non-tokenized mastercard or visa with limitations. Here, we also have another problem of again picking a card from this list. We don't have solid rules to pick one. Maybe choose randomly? I don't plan to support this. Let me know if you think we should support this.

Also, please note that I will need product details and for that I am thinking to use single product details API route. But if I find loading product list to be more useful, I will go with that. So, it is not a final decision to not load product list.

So the 4. Otherwise use reloadly API to fetch available range cards step is really useful for non-tokenized or visa cards. I would implement this feature because it serves as kind of a fallback. @0x4007

@0x4007
Copy link
Member

0x4007 commented Aug 8, 2024

I like fallbacks and redundancies to make our system more resilient. I imagine it will boost confidence in our brand with our end users.

@EresDev
Copy link
Contributor Author

EresDev commented Aug 8, 2024

/start

Copy link

ubiquibot-dev bot commented Aug 8, 2024

DeadlineThu, Aug 15, 9:24 AM UTC
Registered Wallet 0xE7a9fdf596D869AF34a130fa9607178B2B9800D9
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

Copy link

ubiquibot bot commented Aug 8, 2024

DeadlineThu, Aug 15, 9:24 AM UTC
Registered Wallet 0xE7a9fdf596D869AF34a130fa9607178B2B9800D9
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@EresDev
Copy link
Contributor Author

EresDev commented Sep 11, 2024

/start

Copy link
Contributor

ubiquity-os bot commented Sep 11, 2024

! EresDev you were previously unassigned from this task. You cannot be reassigned.

@EresDev EresDev self-assigned this Sep 11, 2024
Copy link
Contributor

ubiquity-os bot commented Sep 11, 2024

@EresDev the deadline is at Wed, Sep 18, 8:27 PM UTC

Copy link
Contributor

ubiquity-os bot commented Sep 15, 2024

@EresDev, this task has been idle for a while. Please provide an update.

@EresDev EresDev closed this as completed Sep 17, 2024
Copy link
Contributor

ubiquity-os bot commented Sep 17, 2024

[ 874.298 WXDAI ]

@EresDev
Contributions Overview
View Contribution Count Reward
Issue Task 1 800
Issue Specification 1 55.32
Issue Comment 2 18.978
Review Comment 22 0
Conversation Incentives
Comment Formatting Relevance Reward
Currently, the virtual card feature is offering all visa & m…
55.32
content:
  p:
    symbols:
      \b\w+\b:
        count: 170
        multiplier: 0.1
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.1
    score: 5
  code:
    symbols:
      \b\w+\b:
        count: 23
        multiplier: 0.1
    score: 5
multiplier: 3
1 55.32
The initial setup was easier. Reloadly API was doing most of the…
8.47
content:
  p:
    symbols:
      \b\w+\b:
        count: 82
        multiplier: 0.2
    score: 1
multiplier: 1
0.6 5.082
I see this is the step where we would need to fetch the product …
17.37
content:
  p:
    symbols:
      \b\w+\b:
        count: 191
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 13.896
Resolves https://github.com/ubiquity/pay.ubq.fi/issues/273 How …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 108
        multiplier: 0
    score: 1
  h2:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0
    score: 1
multiplier: 0
0.7 -
When we send order to reloadly after blockchain permit transfer …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 62
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I have removed it. It is not needed anymore.
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
This comes under `@media (prefers-color-scheme: light) {`…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 36
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Ok, I am going to take a look into this again.
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 11
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I have looked into it. I see that similar CSS is specified in th…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 132
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Yes, I also found it strange but it was a problem on the Reloadl…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 150
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
This is the frontend side of your [above](https://github.com/ubi…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 31
        multiplier: 0.2
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I was hoping I would access the array with different keys but I …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 28
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
This is true. We don't have control once we get the redeem code.…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 109
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Ok, I will add a new issue for this as this will require refacto…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 61
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I have added a new issue. https://github.com/ubiquity/pay.ubq.fi…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I have refactored the countries array to Record instead of Map. …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 72
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Just a placeholder before the actual redeem codes are displayed.…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 70
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Yes. I have been replacing `claim` term with `mint&#…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 33
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
True. The conversation reward plugin kept me occupied and I have…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 67
        multiplier: 0.2
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 0
multiplier: 0
1 -
# Card Minting One of the ways to get paid in the DevPool is by…
0
content:
  h1:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 1
  p:
    symbols:
      \b\w+\b:
        count: 381
        multiplier: 0.2
    score: 1
  h2:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
@Keyrxng This probably happens when anvil gets stuck. Why anvil…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 175
        multiplier: 0.2
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I have added information to readme.
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Hey team, can I go ahead and merge this into beta branch? We hav…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 26
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
You can start using it now, but it would be nice to have this ht…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 69
        multiplier: 0.2
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
@0x4007 I have also recharged Reloadly with 50$ in testing wit…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 51
        multiplier: 0.2
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 0
multiplier: 0
1 -

[ 22.377 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Comment 2 0.467
Review Comment 18 21.91
Conversation Incentives
Comment Formatting Relevance Reward
I imagine that the initial set up would have taken longer, how c…
1.59
content:
  p:
    symbols:
      \b\w+\b:
        count: 26
        multiplier: 0.1
    score: 1
multiplier: 1
0.2 0.318
I like fallbacks and redundancies to make our system more resili…
1.49
content:
  p:
    symbols:
      \b\w+\b:
        count: 24
        multiplier: 0.1
    score: 1
multiplier: 1
0.1 0.149
There's some minor stuff. Once addressed you can merge.
0.71
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.71
Can you elaborate on what the purpose is of this
0.71
content:
  p:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.71
I think this might be wrong. You might need to put dark mode the…
1.59
content:
  p:
    symbols:
      \b\w+\b:
        count: 26
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.59
Same with this variable
0.32
content:
  p:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.32
I remember making a build script to dynamically generate the lig…
3.48
content:
  p:
    symbols:
      \b\w+\b:
        count: 65
        multiplier: 0.1
    score: 1
multiplier: 1
1 3.48
Oh interesting. Perhaps we should implement it. It should cut st…
0.94
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.94
Curaçao? ```suggestion CW: "Curaçao", `&#…
0.43
content:
  p:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.43
```suggestion _html += html`<div class="…
0.39
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.39
```suggestion giftCardsSection.innerHTML = "<…
1.11
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 17
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.11
```suggestion giftCardsSection.innerHTML = "<…
1.22
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 19
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.22
```suggestion htmlParts.push(`<h2 class="c…
0.71
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.71
```suggestion htmlParts.push(`<h2 class="c…
0.83
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 12
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.83
```suggestion htmlParts.push(`<p class="…
1.11
content:
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 17
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.11
It would be nice to use "mint" terminology over "claim" if it ma…
1.11
content:
  p:
    symbols:
      \b\w+\b:
        count: 17
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.11
These `xxx` seem strange. What are they for?
0.62
content:
  p:
    symbols:
      \b\w+\b:
        count: 7
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.62
Hey there, curious to know if you have any remarks on this proje…
2
content:
  p:
    symbols:
      \b\w+\b:
        count: 34
        multiplier: 0.1
    score: 1
multiplier: 1
1 2
Lets definitely just make a page on [dao.ubq.fi/card-minting](ht…
2.09
content:
  p:
    symbols:
      \b\w+\b:
        count: 28
        multiplier: 0.1
    score: 1
  a:
    symbols:
      \b\w+\b:
        count: 5
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.09
QA video looks pretty solid. Just minor cosmetic improvements I …
2.54
content:
  p:
    symbols:
      \b\w+\b:
        count: 45
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.54

[ 4.769 WXDAI ]

@rndquu
Contributions Overview
View Contribution Count Reward
Issue Comment 2 4.769
Conversation Incentives
Comment Formatting Relevance Reward
Why not? I mean the flow for picking up the "best" card could be…
3.51
content:
  p:
    symbols:
      \b\w+\b:
        count: 45
        multiplier: 0.1
    score: 1
  ol:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \b\w+\b:
        count: 4
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.1
    score: 1
multiplier: 1
0.9 3.159
So the `4. Otherwise use reloadly API to fetch available ran…
2.3
content:
  p:
    symbols:
      \b\w+\b:
        count: 26
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 10
        multiplier: 0.1
    score: 1
multiplier: 1
0.7 1.61

[ 15.8 WXDAI ]

@Keyrxng
Contributions Overview
View Contribution Count Reward
Review Comment 5 15.8
Conversation Incentives
Comment Formatting Relevance Reward
I attempted to QA the logic locally but I wasn't able to get pas…
6.16
content:
  p:
    symbols:
      \b\w+\b:
        count: 125
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
multiplier: 1
1 6.16
Is seems strange to return a `200` status if we have no …
1.62
content:
  p:
    symbols:
      \b\w+\b:
        count: 23
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.62
product is nullable here following a successful order response, …
0.88
content:
  p:
    symbols:
      \b\w+\b:
        count: 13
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.88
Have you considered exporting `Map`s for `allowedCou…
1.25
content:
  p:
    symbols:
      \b\w+\b:
        count: 15
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.25
That makes sense I guess. And in this rare scenario where the pr…
5.89
content:
  p:
    symbols:
      \b\w+\b:
        count: 121
        multiplier: 0.1
    score: 1
multiplier: 1
1 5.89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants