brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.62k stars 2.29k forks source link

ZebPay — Phase1 #32036

Closed szilardszaloki closed 1 year ago

LaurenWags commented 1 year ago

Full checks on Windows and macOS, reduced cases on Linux.

GeetaSarvadnya commented 1 year ago

Verification PASSED on

Brave | 1.58.91 Chromium: 116.0.5845.96 (Official Build) beta (64-bit)
-- | --
Revision | 620fa9c0307b294dd6e7c6b0976bc1f93fecf369
OS | Windows 10 Version 22H2 (Build 19045.3324)

Known Issues:

  1. Click on the Go to ZebPay account via BR panel redirects to the ZebPay portal but it doesn't display the account balance and other details, It shows the message as Failed to get customer level Issue is not from our end - @Miyayes is following up with ZebPay team
  2. In grandfathered unverified state (Case 2), the ZebPay custodian is shown in brave://rewards page without "IN" geo declare
Case 1: Basic connection/linking_PASSED 1. New profile, enable Rewards and select India 2. Make sure that ZebPay is the only visible option in the custodian selection modal, and that Uphold, Gemini, bitFlyer do not appear. (If [Do not show bullet point #2 in custodian selection modal when country is India](https://github.com/brave/brave-browser/issues/32251) is merged into your build, check that the 2nd bullet point about “topping up” is removed from the custodial selection modal screen.) 3. Connect Rewards to ZebPay account that has some BAT in it 4. Check if authorization / linking flow succeeds and user goes into Connected state 5. Check if balance on NTP Rewards widget, Rewards panel, and brave://rewards settings page match the balance in the ZebPay account 6. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) 7. Ensure that there is no “userdrain tooltip” notice (yellow question mark) on NTP widget, Rewards panel, and brave://rewards settings page. 8. Go to a Verified Creator to try and initiate a tip/contribution. Ensure that the text in the Contribution Banner says “ZebPay”. Also, make sure that the appropriate error shows up saying that the Creator is unable to receive tips from ZebPay (because there do not exist any ZebPay creators at this time). 9. Check “Go to my ZebPay account” works under the “Connected” pill dropdown menu in the Rewards panel, and also in the panel on the brave://rewards page. step 1 | step 2 | step 6 | step 9(1) | step 9(2) | step 9(3) -------|--------|---------|----------|----------|--------- ![image](https://github.com/brave/brave-browser/assets/38657976/51379d8c-19ae-4fa5-ba29-e7a27f835ffb) | ![image](https://github.com/brave/brave-browser/assets/38657976/b266e373-5f50-435c-9457-516d345b2f34) | ![image](https://github.com/brave/brave-browser/assets/38657976/87f1051c-afc7-42c2-87aa-25f052f2eaf4) | ![image](https://github.com/brave/brave-browser/assets/38657976/9b737550-7e49-40e2-a3ce-d19b47c859bd) | ![image](https://github.com/brave/brave-browser/assets/38657976/aad7aa78-fcd7-406a-b1de-fb909b76f7f8) | ![image](https://github.com/brave/brave-browser/assets/38657976/ea54df5e-2f98-4bcb-b0fe-b23612653d9a) **_ZebPay balance display_** **steps 3, 5 and 7** Rewards settings page | BR panel | NTP | Pubs page -------------------------|-----------|-------|-------------- ![image](https://github.com/brave/brave-browser/assets/38657976/d06ba030-ded3-4d59-9ddb-5e9daecb08d8) | ![image](https://github.com/brave/brave-browser/assets/38657976/264ef547-657f-4997-b546-6957bdb85ff9) | ![image](https://github.com/brave/brave-browser/assets/38657976/dc55167d-fed4-4e8f-aa13-e59bc7b2fb43) | ![image](https://github.com/brave/brave-browser/assets/38657976/7ed73697-d90c-4945-a66d-aacdf26d3bca) **_Linking flow success logs:_** **step 4** ``` [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/229974ca-9f8d-5e8a-a361-a0cbc0f825f9/claim > Method: POST > Content: {"linking_info":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1ZhbGlkIjp0cnVlLCJhY2NvdW50SWQiOiI5QUFEOTMzMjhFRDAyMTEwNDM4NTY2QjExNjJGNDhCOCIsImRlcG9zaXRJZCI6IjEzNDYwIiwiY291bnRyeUNvZGUiOiJJTiIsIm5iZiI6MTY5Mjc2ODM1NiwiZXhwIjoxNjkyNzcxOTU2LCJpYXQiOjE2OTI3NzAxNTZ9.ZW7ZnPjDOqAtRbekUBMeQKb6F5_cmiWko5BPa08QQ2k"} > Content Type: application/json; charset=utf-8 > Header digest: SHA-256=bzlp7rjQMrSntmKDAPXXXgLzjGRllV40Jq5JuM51bkM= > Header signature: keyId="229974ca-9f8d-5e8a-a361-a0cbc0f825f9",algorithm="ed25519",headers="digest (request-target)",signature="lTHdjy7pb5GyKKK2H+kYF7stkAZcp+bcu59o8l2LaTQK9GjEQsFZV9f7Vsq730XIJMwgbCUB4ilZ7iNZEPtbCQ==" > Header accept: application/json [2268:1668:0823/112555.789:VERBOSE6:logging_util.cc(120)] ---- [ RESPONSE - OnResponse ] > Url: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/229974ca-9f8d-5e8a-a361-a0cbc0f825f9/claim > Result: Success > HTTP Code: 200 > Body: {} [2268:1668:0823/112555.791:VERBOSE9:logging_util.cc(121)] ``` **_Balance check logs:_** **step 5** ``` [ REQUEST ] > URL: https://rewards.zebpay.co/api/balance > Method: GET --- [ RESPONSE - OnResponse ] > Url: https://rewards.zebpay.co/api/balance > Result: Success > HTTP Code: 200 > Body: {"BAT":10000} [24880:1648:0823/180452.475:VERBOSE9:logging_util.cc(121)] [ RESPONSE HEADERS ] > Url: https://rewards.zebpay.co/api/balance > Header access-control-expose-headers: order-total-count > Header cf-cache-status: DYNAMIC > Header cf-ray: 7fb3645e2c79c386-SEA > Header content-encoding: gzip > Header content-type: application/json; charset=utf-8 > Header date: Wed, 23 Aug 2023 12:34:53 GMT > Header request-context: appId=cid-v1:440228f4-2c7b-418d-8add-9818d86340de > Header server: cloudflare > Header vary: Accept-Encoding [24880:1648:0823/180454.557:VERBOSE6:logging_util.cc(120)] ``` **_Cross custodian tipping banner message:_** **step 8** Uphold | Gemini | bitFlyer ---------|---------|--------- ![image](https://github.com/brave/brave-browser/assets/38657976/59920338-b959-48c9-87ca-734225e2f673) | ![image](https://github.com/brave/brave-browser/assets/38657976/4238b3d0-2a02-43ab-ae9a-457477acb1f1) | ![image](https://github.com/brave/brave-browser/assets/38657976/4321aecd-692c-415a-be7f-5f114854cddc)
Case 2: Deferred userdrain_Inprogress_PASSED 1. Create profile on old version of Brave 3. Send yourself some vBAT 4. Upgrade to a more recent version so that you are in the grandfathered-unverified state 5. Connect to ZebPay 6. Check if the vBAT was submitted for userdrain. Note: The BAT won’t be sent to the ZebPay account immediately. Just make sure that the vBAT was submitted to our servers. Go to brave://rewards-internals and make sure “Rewards BAT'' balance is 0.00 BAT. Also, you can check on Metabase/ask the Rewards-backend team to check that the vBAT userdrain attempt was received by our backend servers. 7. Make sure “userdrain tooltip” (yellow question mark) appears on NTP widget, Rewards panel, and brave://rewards settings page. 8. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) **`1.45.100`** - step 1, 2 | **`1.58.97`** - step 3 | **`1.58.97`** - step 3(1) | **`1.58.97`** - step 4 | step 5 ---------------------------|------------------------|---------------------------|-----------------------|------ ![image](https://github.com/brave/brave-browser/assets/38657976/9392a800-0155-4a97-9a6b-78150bbc3644) | ![image](https://github.com/brave/brave-browser/assets/38657976/f6c70a25-ff27-4496-8d4c-1834ed03e955) | ![image](https://github.com/brave/brave-browser/assets/38657976/495b45b8-fb92-43d0-a63b-e4e20cd02a74) | ![image](https://github.com/brave/brave-browser/assets/38657976/a35c3c00-3c44-42a9-bb6b-e7d82213901e) | ![image](https://github.com/brave/brave-browser/assets/38657976/224c0397-285b-41e7-ba0d-c78c41e43d77) Step 6 | Step 6 (1) | Step 6 (2) --------|-----------|----------- ![image](https://github.com/brave/brave-browser/assets/38657976/523d9166-e8f6-4e19-a79a-f67fb1eaa3f6) | ![image](https://github.com/brave/brave-browser/assets/38657976/2bbd1f1b-6fa4-468d-963e-b007c4888889) | ![image](https://github.com/brave/brave-browser/assets/38657976/17cebe37-7fb4-4dd9-b9df-679548eb43cc) ![image](https://github.com/brave/brave-browser/assets/38657976/e429eb97-a39c-477b-ae42-30779a8ac613) | ![image](https://github.com/brave/brave-browser/assets/38657976/8e624752-290c-4ddd-8b61-9e79eafa6437) | ![image](https://github.com/brave/brave-browser/assets/38657976/aeeec3d0-790d-4840-a609-3eb210ec75cc) Confirmation from server team that userdrain occurred and is on the server as expected: https://bravesoftware.slack.com/archives/C0NPFB6H5/p1693321188261289?thread_ts=1692789212.170909&cid=C0NPFB6H5
Case 3: Logged out state → Connected state_PASSED 1. New profile, enable Rewards and choose India 2. Connect Rewards to ZebPay account 3. Ensure that Rewards profile is now in “Connected” state 4. Expire the access token a. Maybe you can do this yourself with Charles proxy somehow, or you may have to ask ZebPay’s team to expire the access token for you. There’s no UI in ZebPay to do this right now it seems. 5. Ensure that Rewards profile is now in the “Logged out” state 6. Log in/auth again with ZebPay 7. Ensure that the Rewards profile is now back in the Connected state **_Connected state_** Example | Example | Example | Example ----------|----------|-----------|----------- ![image](https://github.com/brave/brave-browser/assets/38657976/2b3d1aaa-c57f-4853-9aea-f88cb602b894) | ![image](https://github.com/brave/brave-browser/assets/38657976/2c9d77a5-79f4-41d6-8142-aeef0ba53dbf) | ![image](https://github.com/brave/brave-browser/assets/38657976/d4749e82-525a-4381-ac2d-7f618ccfa936) | ![image](https://github.com/brave/brave-browser/assets/38657976/e8d6250b-80e8-4847-9f3f-547a95a39726) **_Logged out state_** Example | Example | Example ----------|----------|----------- ![image](https://github.com/brave/brave-browser/assets/38657976/76d2e534-26c2-4c09-b7ee-05b02d13570a) | ![image](https://github.com/brave/brave-browser/assets/38657976/fa3c3879-fb58-4cf0-a7a5-4a92b3755f8e) | ![image](https://github.com/brave/brave-browser/assets/38657976/00a96622-2a13-4d1e-be35-0d0cd8a132fd) **_Re-connect state_** Example | Example | Example ----------|----------|----------- ![image](https://github.com/brave/brave-browser/assets/38657976/bbcd384d-c7f7-4b41-9460-8a5e7e45b672) | ![image](https://github.com/brave/brave-browser/assets/38657976/a0af26f7-f1db-4dec-9262-68190747e20d) | ![image](https://github.com/brave/brave-browser/assets/38657976/7766cfb7-6713-40ec-b22d-1fc2f7a53f20)
Case 4: vBAT sunset notices_PASSED 1. New profile in an old version of Brave, then upgrade so that you’re in the grandfathered state 2. If it asks you to declare country, choose India 3. Make sure that at /parameters endpoint, vbatExpired = false, and that the vbatDeadline is sometime in the future. 4. Ensure that you see vBAT countdown notices, and that the messaging tells the user to connect a custodial account. (It should NOT show the notices that tell the user there is no available custodian and that they should contribute/tip all their vBAT away.) Check the NTP widget, brave://rewards page, and Rewards panel for these notices. 5. Click to connect to a custodian via the notices and make sure that ZebPay is an option. 6. Connect to ZebPay and make sure that you’re in the connected state with ZebPay. 7. After in the connected state, make sure all vBAT notices are gone, and that it looks like a normal ZebPay connected state. 8. Ensure that there are “userdrain tooltip” notices (yellow question marks) on NTP widget, Rewards panel, and brave://rewards settings page. **steps 1.2** **`1.45.100`** | **`1.58.x`** | **`1.58.x`** ---------------|--------------|------------- ![image](https://github.com/brave/brave-browser/assets/38657976/4363dcc0-1c49-4a3d-9eb2-388e8ddd9cb4) | ![image](https://github.com/brave/brave-browser/assets/38657976/f10fb16f-b724-4b90-8ebb-1960e1964d45) | ![image](https://github.com/brave/brave-browser/assets/38657976/cbedf098-6c7a-4ee1-8a01-4080be4e9992) **step 3** Future date is set in the `vbatDeadline` and `vbatExpired` is false at the `/parameter` endpoint (Used charles proxy to rewrite rule for the parameter response) ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET --- [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.170927,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"processing","zebpay":""},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-09-25T04:00:00Z","vbatExpired":false} [20212:21320:0823/194910.378:VERBOSE9:logging_util.cc(121)] ``` **_vBAT countdown notices:_** **step 4** brave://rewards | BR panel | NTP ------------------|-----------|------ ![image](https://github.com/brave/brave-browser/assets/38657976/d3938906-d004-44a4-8d12-d0332643120d) | ![image](https://github.com/brave/brave-browser/assets/38657976/5a1d24eb-7bec-4ee0-aec4-358e2d4d2d53) | ![image](https://github.com/brave/brave-browser/assets/38657976/4a1d5aad-ef34-4550-b217-1c94b7e228a6) - Confirmed that click on `Connect account` opens up the rewards `ZebPay` custodian modal popup. - Conncet ZebPay and confirmed that you’re in the connected state with ZebPay step 5 | step 6 | step 7,8 | step 7,8 (1) | step 7,8 (2) -------|--------| --------|------------|------------- ![image](https://github.com/brave/brave-browser/assets/38657976/a3078c8e-5cc1-4de8-91e6-f157ae1d2d8b) | ![image](https://github.com/brave/brave-browser/assets/38657976/fd413f4e-5843-415b-a129-db89d8e402ad) | ![image](https://github.com/brave/brave-browser/assets/38657976/f68ed279-b7ae-43f7-8be9-0d40c78334ca) | ![image](https://github.com/brave/brave-browser/assets/38657976/f49822ca-1e05-4084-8d83-df338fe8ea8b) | ![image](https://github.com/brave/brave-browser/assets/38657976/10aaff0a-37df-4922-becd-9430258bdf63)
Case 5: Payout status banners_PASSED - Followed the test plan from https://github.com/brave/brave-browser/issues/31480#issuecomment-1684000163 and verified the payout banners for ZebPay custodian **_1. Payout begin banner_** brave://rewards | BR Panel | NTP ------------------|-----------|------- ![image](https://github.com/brave/brave-browser/assets/38657976/3bce11be-0c5f-4e2b-99be-c87893ed84f2) | ![image](https://github.com/brave/brave-browser/assets/38657976/d9304c7c-1861-49e2-9074-9652d2e7fe05) | ![image](https://github.com/brave/brave-browser/assets/38657976/1c118a23-3e5a-40d0-b761-946db1a98201) ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET --- [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.172062,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"complete","zebpay":""},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false} [20124:18456:0823/201706.790:VERBOSE9:confirmation_state_manager.cc(194)] Successfully saved confirmations state [20124:18456:0823/201706.794:VERBOSE9:logging_util.cc(121)] ``` **_2. Payout processing banner_** brave://rewards | BR Panel | NTP ------------------|-----------|------- ![image](https://github.com/brave/brave-browser/assets/38657976/e265e661-7d5e-4ec3-a5ea-3a51d8415a60) | ![image](https://github.com/brave/brave-browser/assets/38657976/b0f9fb19-99df-4d53-a86f-7fb68970ef3f) | ![image](https://github.com/brave/brave-browser/assets/38657976/c1e02a77-f1c3-436b-bb9f-57ea3cfd63a3) ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET --- [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.170927,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"processing","zebpay":"processing"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false} [26764:27116:0901/203547.659:VERBOSE9:logging_util.cc(121)] `` ``` **_3. Payout complete banner_** brave://rewards | BR Panel | NTP ------------------|-----------|------- ![image](https://github.com/brave/brave-browser/assets/38657976/8ea811a4-1fee-4189-9da3-ff374bcaebe5) | ![image](https://github.com/brave/brave-browser/assets/38657976/4a616807-8b73-4b90-90ad-3e41ad5cfe4a) | ![image](https://github.com/brave/brave-browser/assets/38657976/7f084249-361f-4662-99a5-9ffd6c430c09) ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET --- [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.170927,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"processing","zebpay":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]}, "vbatDeadline":"2023-01-25T04:00:00Z", "vbatExpired":false} [13004:21464:0930/204450.972:VERBOSE9:logging_util.cc(121)] ```
Case 6: Australia ZebPay account_PASSED 1. Clean profile 2. Close/relaunch to pull griffin 3. Enable rewards, select India 4. Connect Australia account from spreadsheet 5. Note, I had to select "Login" after entering my PIN twice 6. Get 404 page from ZebPay. 7. Confirmed unable to connect non-India ZebPay account to Rewards. ![image](https://github.com/brave/brave-browser/assets/38657976/9d662ddf-5d5a-4a11-adc6-022c187d8915)
LaurenWags commented 1 year ago

Verified with

Brave | 1.58.100 Chromium: 116.0.5845.114 (Official Build) beta (x86_64)
-- | --
Revision | a8c0058265009a1858c4502b9ba413671fbb61e1
OS | macOS Version 13.5.1 (Build 22G90)

Known Issues:

  1. Click on the Go to ZebPay account via BR panel redirects to the ZebPay portal but it doesn't display the account balance and other details, It shows the message as Failed to get customer level Issue is not from our end - @Miyayes is following up with ZebPay team
  2. In grandfathered unverified state (Case 2), the ZebPay custodian is shown in brave://rewards page without "IN" geo declare
  3. Encountered https://github.com/brave/brave-browser/issues/32470 while testing
Case 1: Basic connection/linking - PASSED 1. New profile, enable Rewards and select India 4. Make sure that ZebPay is the only visible option in the custodian selection modal, and that Uphold, Gemini, bitFlyer do not appear. (If [Do not show bullet point #2 in custodian selection modal when country is India](https://github.com/brave/brave-browser/issues/32251) is merged into your build, check that the 2nd bullet point about “topping up” is removed from the custodial selection modal screen.) 5. Connect Rewards to ZebPay account that has some BAT in it 6. Check if authorization / linking flow succeeds and user goes into Connected state 7. Check if balance on NTP Rewards widget, Rewards panel, and brave://rewards settings page match the balance in the ZebPay account 8. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) 9. Ensure that there is no “userdrain tooltip” notice (yellow question mark) on NTP widget, Rewards panel, and brave://rewards settings page. 10. Go to a Verified Creator to try and initiate a tip/contribution. Ensure that the text in the Contribution Banner says “ZebPay”. Also, make sure that the appropriate error shows up saying that the Creator is unable to receive tips from ZebPay (because there do not exist any ZebPay creators at this time). 11. Check “Go to my ZebPay account” works under the “Connected” pill dropdown menu in the Rewards panel, and also in the panel on the brave://rewards page. step 1 | step 2 | step 6 | step 9(1) | step 9(2) | step 9(3) -------|--------|---------|----------|----------|--------- 1 | 2 | 6 | 9a | 9b | 9c **_ZebPay balance display_** **steps 3, 5 and 7** Rewards settings page | BR panel | NTP | brave://rewards-internals -------------------------|-----------|-------|-------------- 5 | 5a | 5b | 5c **_Linking flow success logs:_** **step 4** ``` [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/3bdfd3c3-d234-58b9-afb5-ec0abf074f02/claim > Method: POST > Content: {"linking_info":"eyJhb.............. [ RESPONSE - OnResponse ] > Url: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/3bdfd3c3-d234-58b9-afb5-ec0abf074f02/claim > Result: Success > HTTP Code: 200 > Body: {} ``` **_Balance check logs:_** **step 5** ``` [ REQUEST ] > URL: https://rewards.zebpay.co/api/balance > Method: GET [ RESPONSE - OnResponse ] > Url: https://rewards.zebpay.co/api/balance > Result: Success > HTTP Code: 200 > Body: {"BAT":9000} ``` **_Cross custodian tipping banner message:_** **step 8** Uphold | Gemini | bitFlyer ---------|---------|--------- 8a | 8b | 8c
Case 2: Deferred userdrain - PASSED 1. Be in the grandfathered-unverified state with some vBAT balance 3. Connect to ZebPay 4. Check if the vBAT was submitted for userdrain. Note: The BAT won’t be sent to the ZebPay account immediately. Just make sure that the vBAT was submitted to our servers. Go to brave://rewards-internals and make sure “Rewards BAT'' balance is 0.00 BAT. Also, you can check on Metabase/ask the Rewards-backend team to check that the vBAT userdrain attempt was received by our backend servers. 5. Make sure “userdrain tooltip” (yellow question mark) appears on NTP widget, Rewards panel, and brave://rewards settings page. 6. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) Grandfathered Unverified State: Example | Example | Example | Example --- | --- | --- | --- 1 | 2 | 3 | 4 Userdrain logs: ``` [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey":........ [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey":........ [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey": [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"ef1a0077-974d-42cc-b7d1-90277bf3acdb"} [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"ee60250a-9aa6-4f39-8d72-9a151971d01f"} [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"984b2539-53ff-4970-a572-42160a5ecc01"} ``` After connecting ZebPay and userdrain occurs: Example | Example | Example | Example --- | --- | --- | --- 5 | 6 | 7 | 8 "Userdrain tooltip": Note, encountered https://github.com/brave/brave-browser/issues/32470 while testing. Example | Example | Example --- | --- | --- 9 | 10 | 11 Confirmation from server team that userdrain occurred and is on the server as expected: https://bravesoftware.slack.com/archives/C0NPFB6H5/p1693321188261289?thread_ts=1692789212.170909&cid=C0NPFB6H5
Case 3: Logged out state → Connected state - PASSED 1. New profile, enable Rewards and choose India 2. Connect Rewards to ZebPay account 3. Ensure that Rewards profile is now in “Connected” state Example | Example | Example | Example | Example ----------|----------|-----------|-----------|----- 1 | 2 | 3 | 4 | 5 4. Expire the access token (how is TBD) 5. Ensure that Rewards profile is now in the “Logged out” state ``` [31953:259:0828/083545.735660:INFO:get_balance_zebpay.cc(45)] Access token expired! [31953:259:0828/083545.736120:VERBOSE1:wallet_util.cc(388)] Logging out zebpay wallet... ``` Example | Example | Example | Example | Example ----------|----------|-----------|-----------|----- 1 | 2 | 3 | 4 | 5 7. Log in/auth again with ZebPay - Confirmed able to login from brave://rewards CTA (both - one from the blue box, one from the "Logged out" drop down) - Confirmed able to login from panel CTA (three - one from the toast notification "Reconnect" button, one from the blue box, one from the "Logged out" drop down) - Confirmed able to login from NTP CTA (one - from the blue box) 8. Ensure that the Rewards profile is now back in the Connected state Example | Example --- | --- 6 | 7
Case 4: vBAT sunset notices - PASSED 1. New profile in an old version of Brave, enable Rewards (I also sent myself an ad grant) and then upgrade so that you’re in the grandfathered state 2. If it asks you to declare country, choose India 3. Make sure that at /parameters endpoint, vbatExpired = false, and that the vbatDeadline is sometime in the future. (Note, per discussion with Chris, `vbatDeadline` was removed but we can add it back via testing with Charles Proxy for this test. So if you see it not returned by default from /parameters, this is why) 4. Ensure that you see vBAT countdown notices, and that the messaging tells the user to connect a custodial account. (It should NOT show the notices that tell the user there is no available custodian and that they should contribute/tip all their vBAT away.) Check the NTP widget, brave://rewards page, and Rewards panel for these notices. 5. Click to connect to a custodian via the notices and make sure that ZebPay is an option. 6. Connect to ZebPay and make sure that you’re in the connected state with ZebPay. 7. After in the connected state, make sure all vBAT notices are gone, and that it looks like a normal ZebPay connected state. 9. Ensure that there are “userdrain tooltip” notices (yellow question marks) on NTP widget, Rewards panel, and brave://rewards settings page. **steps 1 and 2** **`1.45.100`** | **`1.45.100`** | **`1.58.x`** | **`1.58.x`** ---------------|--------------|-------------|------------- 1a | 1b | 2a | 2b **step 3** Future date is set in the `vbatDeadline` and `vbatExpired` is false at the `/parameter` endpoint (Used charles proxy to rewrite rule for the parameter response) ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.170927,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"processing","zebpay":""},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-09-25T04:00:00Z","vbatExpired":false} ``` **_vBAT countdown notices:_** **step 4** brave://rewards | BR panel | NTP ------------------|-----------|------ 1 | 2 | 3 Steps 5-8: - Confirmed that click on `Connect account` opens up the rewards `ZebPay` custodian modal popup. - Connect ZebPay and confirmed that you’re in the connected state with ZebPay - Confirmed yellow "?" userdrain icon and hover text (note, encountered https://github.com/brave/brave-browser/issues/32470) Example | Example | Example | Example | Example | Example | Example | Example | Example --- | --- | --- | --- | --- | --- | --- | --- | --- 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13
Case 5: Payout status banners - PASSED - Confirmed pending/processing/completed payout banners display for ZebPay connected users **_1. Payout begin (pending) banner_** System Date | Panel | brave://rewards | NTP Widget --- | --- | --- | --- Screenshot 2023-09-03 at 1 20 54 PM | Screenshot 2023-09-03 at 1 21 17 PM | Screenshot 2023-09-03 at 1 21 25 PM | Screenshot 2023-09-03 at 1 21 34 PM ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.173384,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"off","payoutDate":"","unverified":"complete","uphold":"complete","zebpay":""},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false} ``` **_2. Payout processing banner_** System Date | Panel | brave://rewards | NTP Widget --- | --- | --- | --- Screenshot 2023-09-08 at 1 23 54 PM | Screenshot 2023-09-08 at 1 24 27 PM | Screenshot 2023-09-08 at 1 24 34 PM | Screenshot 2023-09-08 at 1 24 44 PM ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.173384,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"off","payoutDate":"","unverified":"complete","uphold":"complete","zebpay":"processing"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false} ``` **_3. Payout complete banner_** System Date | Panel | brave://rewards | NTP Widget --- | --- | --- | --- Screenshot 2023-09-08 at 1 25 41 PM | Screenshot 2023-09-08 at 1 26 14 PM | Screenshot 2023-09-08 at 1 26 23 PM | Screenshot 2023-09-08 at 1 26 29 PM ``` [ REQUEST ] > URL: https://api.rewards.bravesoftware.com/v1/parameters > Method: GET [ RESPONSE - OnResponse ] > Url: https://api.rewards.bravesoftware.com/v1/parameters > Result: Success > HTTP Code: 200 > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.173384,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"off","payoutDate":"","unverified":"complete","uphold":"complete","zebpay":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false} [36925:259:0908/132554.523674:VERBOSE9:logging_util.cc(121)] ```
Case 6: Connecting non-India ZebPay account - PASSED 1. New profile, enable Rewards and select India 2. Make sure that ZebPay is the only visible option in the custodian selection modal, and that Uphold, Gemini, bitFlyer do not appear. 3. Connect Rewards to ZebPay account (from accounts spreadsheet) that is not for India. - able to enter account number - able to enter 2FA code - able to enter PIN 4. Confirm unable to connect non-India ZebPay account to Rewards. - Note, I see a 400 error page on ZebPay, not sure if this is expected, checking with Chris as this appears to be on their side, not on ours. Example | Example --- | --- 1 | 2
LaurenWags commented 1 year ago

Verified with

Brave   1.58.116 Chromium: 116.0.5845.180 (Official Build) beta (64-bit) 
Revision    a35434b49b9cb7675b96179d5994e1f6a21954de
OS  Linux
Case 1: Basic connection/linking - PASSED with note 1. New profile, enable Rewards and select India 4. Make sure that ZebPay is the only visible option in the custodian selection modal, and that Uphold, Gemini, bitFlyer do not appear. (If [Do not show bullet point #2 in custodian selection modal when country is India](https://github.com/brave/brave-browser/issues/32251) is merged into your build, check that the 2nd bullet point about “topping up” is removed from the custodial selection modal screen.) 5. Connect Rewards to ZebPay account that has some BAT in it 6. Check if authorization / linking flow succeeds and user goes into Connected state 7. Check if balance on NTP Rewards widget, Rewards panel, and brave://rewards settings page match the balance in the ZebPay account 8. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) 9. Ensure that there is no “userdrain tooltip” notice (yellow question mark) on NTP widget, Rewards panel, and brave://rewards settings page. 10. Go to a Verified Creator to try and initiate a tip/contribution. Ensure that the text in the Contribution Banner says “ZebPay”. Also, make sure that the appropriate error shows up saying that the Creator is unable to receive tips from ZebPay (because there do not exist any ZebPay creators at this time). 11. Check “Go to my ZebPay account” works under the “Connected” pill dropdown menu in the Rewards panel, and also in the panel on the brave://rewards page. step 1 | step 2 | step 6 | step 9(1) | step 9(2) | step 9(3) -------|--------|---------|----------|----------|--------- 1 | 2 | 6 | 9a | 9b | 9c **_ZebPay balance display_** **steps 3, 5 and 7** Rewards settings page | BR panel | NTP | brave://rewards-internals -------------------------|-----------|-------|-------------- 5a | 5b | 5c | 5d **_Linking flow success logs:_** **step 4** ``` [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/0a9d3dc6-093a-5d67-81b6-059eb0994466/claim > Method: POST > Content: {"linking_info":"eyJhbG......... [ RESPONSE - OnResponse ] > Url: https://grant.rewards.bravesoftware.com/v3/wallet/zebpay/0a9d3dc6-093a-5d67-81b6-059eb0994466/claim > Result: Success > HTTP Code: 200 > Body: {} ``` **_Balance check logs:_** **step 5** ``` [ REQUEST ] > URL: https://rewards.zebpay.co/api/balance > Method: GET [4297:4297:0907/122536.097123:VERBOSE6:logging_util.cc(120)] [ RESPONSE - OnResponse ] > Url: https://rewards.zebpay.co/api/balance > Result: Success > HTTP Code: 200 > Body: {"BAT":9000} ``` **_Cross custodian tipping banner message:_** **step 8** Uphold | Gemini | bitFlyer ---------|---------|--------- 8 | 8a | 8b Note - due to an unrelated item, Gemini is currently disabled in staging. As such, no gemini creators are available to tip either, so the Gemini test above cannot be completed.
Case 2: Deferred userdrain - PASSED 1. Be in the grandfathered-unverified state with some vBAT balance 2. Upgrade and connect to ZebPay 3. Check if the vBAT was submitted for userdrain. Note: The BAT won’t be sent to the ZebPay account immediately. Just make sure that the vBAT was submitted to our servers. Go to brave://rewards-internals and make sure “Rewards BAT'' balance is 0.00 BAT. Also, you can check on Metabase/ask the Rewards-backend team to check that the vBAT userdrain attempt was received by our backend servers. 4. Make sure “userdrain tooltip” (yellow question mark) appears on NTP widget, Rewards panel, and brave://rewards settings page. 5. Go to brave://rewards and make sure there is NO Auto-Contribute feature (similar to bitFlyer case) Grandfathered Unverified State: Example | Example | Example | Example --- | --- | --- | --- 1 | 2 | 3 | 4 Userdrain logs: ``` [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey":"zJ/r+8a........ [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey":"zJ/r+8......... [ REQUEST ] > URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Method: POST > Content: {"credentials":[{"publicKey":"zJ/r+........ [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"39d0e035-a70f-4e7a-ad83-35018e51a56b"} [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"34be8125-044a-435a-b10a-7f26551737c2"} [ RESPONSE - OnRequest ] > Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim > Result: Success > HTTP Code: 200 > Body: {"drainId":"21ea89fc-686e-4771-944a-a7c5e5ca65ab"} ``` After connecting ZebPay and userdrain occurs: Example | Example | Example | Example --- | --- | --- | --- 1 | 2 | 3 | 4 "Userdrain tooltip": Example | Example | Example --- | --- | --- 5 | 6 | 7 Confirmed userdrain is on the server using instructions from https://bravesoftware.slack.com/archives/C0NPFB6H5/p1693900441745289?thread_ts=1692789212.170909&cid=C0NPFB6H5: 8
Case 3: Logged out state → Connected state - PASSED 1. Continue from Case 2, profile is in “Connected” state Example | Example | Example | Example | Example ----------|----------|-----------|-----------|----- 1 | 2 | 3 | 4 | 5 2. Expire the access token (how is TBD) 3. Ensure that Rewards profile is now in the “Logged out” state ``` [2653:2653:0908/085206.882270:INFO:get_balance_zebpay.cc(45)] Access token expired! [2653:2653:0908/085206.883942:VERBOSE1:wallet_util.cc(388)] Logging out zebpay wallet... ``` Example | Example | Example | Example | Example ----------|----------|-----------|-----------|----- 1 | 2 | 3 | 4 | 5 4. Log in/auth again with ZebPay - Confirmed able to login from brave://rewards CTA (both - one from the blue box, one from the "Logged out" drop down) - Confirmed able to login from panel CTA (three - one from the toast notification "Reconnect" button, one from the blue box, one from the "Logged out" drop down) - Confirmed able to login from NTP CTA (one - from the blue box) 5. Ensure that the Rewards profile is now back in the Connected state Example | Example --- | --- 6 | 7
Case 6: Connecting non-India ZebPay account - PASSED with note 1. New profile, enable Rewards and select India 2. Make sure that ZebPay is the only visible option in the custodian selection modal, and that Uphold, Gemini, bitFlyer do not appear. 3. Connect Rewards to ZebPay account (from accounts spreadsheet) that is not for India. - able to enter account number - able to enter 2FA code - able to enter PIN 4. Confirm unable to connect non-India ZebPay account to Rewards. - Note, I see error message on brave://rewards, which is different than previous testing. Confirming with Chris if this is expected. Example | Example --- | --- 1 | 2