Skip to content

Commit

Permalink
fix: purchase url
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatACotton committed May 26, 2024
1 parent 3cc347b commit 1c9ebdd
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ func (h *Handler) SetupRoutesForStripe(firebaseApp validation.IFirebaseApp, User
return
}

ClientSecret, _, err := transactionRequests.Purchase(userId, email)
url, _, err := transactionRequests.Purchase(userId, email)
if err != nil {
utils.ReturnErrorResponse(ctx, err)
return
}
ctx.JSON(http.StatusOK, gin.H{"clientSecret": ClientSecret})
ctx.JSON(http.StatusOK, gin.H{"redirect_url": url})

})
StripeRouter.GET("/transaction", func(ctx *gin.Context) {
Expand Down
162 changes: 162 additions & 0 deletions log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)

[GIN-debug] POST /webhook --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForWebhook.func1 (5 handlers)
[GIN-debug] GET /api/item/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForItem.func1 (4 handlers)
[GIN-debug] GET /api/item --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForItem.func2 (4 handlers)
[GIN-debug] GET /api/user --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForUser.func1 (6 handlers)
[GIN-debug] DELETE /api/user --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForUser.func2 (6 handlers)
[GIN-debug] PATCH /api/profile --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForUser.func3 (6 handlers)
[GIN-debug] POST /api/address --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForUser.func4 (6 handlers)
[GIN-debug] PATCH /api/address --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForUser.func5 (6 handlers)
[GIN-debug] GET /api/cart --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForCart.func1 (6 handlers)
[GIN-debug] POST /api/cart --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForCart.func2 (6 handlers)
[GIN-debug] DELETE /api/cart --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForCart.func3 (6 handlers)
[GIN-debug] POST /api/products/ --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForManufacturer.func1 (7 handlers)
[GIN-debug] PATCH /api/products/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForManufacturer.func2 (7 handlers)
[GIN-debug] DELETE /api/products/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForManufacturer.func3 (7 handlers)
[GIN-debug] GET /api/buy --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForStripe.func1 (6 handlers)
[GIN-debug] GET /api/transaction --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForStripe.func2 (6 handlers)
[GIN-debug] GET /api/transaction/:transactionId --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForStripe.func3 (6 handlers)
[GIN-debug] GET /api/stripe/create --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForStripe.func4 (6 handlers)
[GIN-debug] GET /api/stripe/mypage --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForStripe.func5 (7 handlers)
[GIN-debug] GET /images/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForImages.func1 (4 handlers)
[GIN-debug] POST /images/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForImages.func2 (7 handlers)
[GIN-debug] DELETE /images/:item_id --> github.com/charisworks/charisworks-backend/handler.(*Handler).SetupRoutesForImages.func3 (7 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :8080
[GIN] 2024/05/26 - 09:00:17 | 200 | 1.556541ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/item"
[GIN] 2024/05/26 - 09:00:19 | 200 | 792.337µs | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/item"
[GIN] 2024/05/26 - 09:00:51 | 200 | 1.209027ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/item"
[GIN] 2024/05/26 - 09:00:52 | 204 | 47.501µs | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | OPTIONS "/api/user"
[GIN] 2024/05/26 - 09:00:53 | 200 | 86.324749ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/user"
[GIN] 2024/05/26 - 09:00:53 | 204 | 25.815µs | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | OPTIONS "/api/cart"
[GIN] 2024/05/26 - 09:00:53 | 200 | 61.507942ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/cart"
[GIN] 2024/05/26 - 09:01:55 | 200 | 1.007547ms | 126.33.100.255 | GET "/api/item"
[GIN] 2024/05/26 - 09:01:58 | 204 | 19.061µs | 126.33.100.255 | OPTIONS "/api/user"
[GIN] 2024/05/26 - 09:01:58 | 200 | 62.695208ms | 126.33.100.255 | GET "/api/user"
[GIN] 2024/05/26 - 09:01:58 | 204 | 14.225µs | 126.33.100.255 | OPTIONS "/api/cart"
[GIN] 2024/05/26 - 09:01:58 | 200 | 64.791981ms | 126.33.100.255 | GET "/api/cart"
[GIN] 2024/05/26 - 09:03:10 | 404 | 938ns | 162.142.125.220 | GET "/"
[GIN] 2024/05/26 - 09:03:11 | 404 | 947ns | 162.142.125.220 | PRI "*"
[GIN] 2024/05/26 - 09:04:43 | 200 | 861.2µs | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/item"
[GIN] 2024/05/26 - 09:04:43 | 200 | 59.930769ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/user"
[GIN] 2024/05/26 - 09:04:43 | 200 | 58.262425ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/cart"
[GIN] 2024/05/26 - 09:05:03 | 404 | 1.155µs | 167.248.133.177 | GET "/"
[GIN] 2024/05/26 - 09:05:03 | 404 | 1.28µs | 167.248.133.177 | PRI "*"
[GIN] 2024/05/26 - 09:05:46 | 200 | 1.105317ms | 240b:11:cc01:de00:a53a:7cb2:71ce:fafb | GET "/api/item"
[GIN] 2024/05/26 - 09:50:25 | 200 | 1.322165ms | 126.33.100.255 | GET "/api/item"
[GIN] 2024/05/26 - 09:50:28 | 204 | 29.118µs | 126.33.100.255 | OPTIONS "/api/user"
[GIN] 2024/05/26 - 09:50:29 | 200 | 63.210077ms | 126.33.100.255 | GET "/api/user"
[GIN] 2024/05/26 - 09:50:29 | 204 | 12.865µs | 126.33.100.255 | OPTIONS "/api/cart"
[GIN] 2024/05/26 - 09:50:29 | 200 | 63.534648ms | 126.33.100.255 | GET "/api/cart"
[GIN] 2024/05/26 - 09:57:50 | 404 | 1.522µs | 205.210.31.243 | GET "/"
[GIN] 2024/05/26 - 10:23:20 | 200 | 1.23116ms | 126.33.100.255 | GET "/api/item"
[GIN] 2024/05/26 - 10:23:20 | 200 | 63.405927ms | 126.33.100.255 | GET "/api/user"
[GIN] 2024/05/26 - 10:23:20 | 200 | 64.102448ms | 126.33.100.255 | GET "/api/cart"
[GIN] 2024/05/26 - 10:49:21 | 404 | 19.208µs | 199.45.154.31 | GET "/"
[GIN] 2024/05/26 - 10:49:37 | 404 | 1.318µs | 199.45.154.31 | GET "/"
[GIN] 2024/05/26 - 10:49:38 | 404 | 1.203µs | 199.45.154.31 | PRI "*"
[GIN] 2024/05/26 - 11:05:40 | 404 | 2.784µs | 141.98.11.15 | CONNECT ""
[GIN] 2024/05/26 - 11:08:14 | 404 | 1.089µs | 91.243.167.195 | GET "/"
[GIN] 2024/05/26 - 11:50:31 | 404 | 4.844µs | 87.121.69.52 | CONNECT ""
[GIN] 2024/05/26 - 13:08:28 | 404 | 1.192µs | 205.210.31.74 | GET "/"
[GIN] 2024/05/26 - 13:31:18 | 404 | 908ns | 78.108.177.50 | GET "/"
[GIN] 2024/05/26 - 15:56:55 | 404 | 3.935µs | 115.231.78.12 | GET "/"
[GIN] 2024/05/26 - 15:58:11 | 404 | 1.012µs | 115.231.78.12 | GET "/"
[GIN] 2024/05/26 - 15:58:12 | 404 | 570ns | 115.231.78.12 | GET "/favicon.ico"
[GIN] 2024/05/26 - 15:58:13 | 404 | 875ns | 115.231.78.12 | GET "/robots.txt"
[GIN] 2024/05/26 - 16:51:52 | 404 | 1.054µs | 185.224.128.17 | CONNECT ""
[GIN] 2024/05/26 - 17:24:52 | 404 | 3.908µs | 141.98.11.15 | CONNECT ""
[GIN] 2024/05/26 - 18:00:04 | 404 | 1.101µs | 87.121.69.52 | CONNECT ""
[GIN] 2024/05/26 - 18:08:55 | 200 | 2.161329ms | 167.250.109.18 | GET "/api/item"
[GIN] 2024/05/26 - 18:24:12 | 404 | 2.996µs | 80.75.212.75 | CONNECT ""
[GIN] 2024/05/26 - 19:32:35 | 404 | 1.248µs | 64.62.197.81 | GET "/"
[GIN] 2024/05/26 - 19:32:54 | 404 | 945ns | 64.62.197.87 | GET "/favicon.ico"
[GIN] 2024/05/26 - 19:33:09 | 404 | 1.344µs | 64.62.197.85 | GET "/?format=json"
[GIN] 2024/05/26 - 19:33:14 | 404 | 1.186µs | 64.62.197.81 | CONNECT ""
[GIN] 2024/05/26 - 19:39:29 | 404 | 1.012µs | 87.121.69.27 | CONNECT ""
[GIN] 2024/05/26 - 19:50:11 | 404 | 1.995µs | 165.154.100.56 | GET "/"
[GIN] 2024/05/26 - 19:50:29 | 404 | 1.082µs | 165.154.100.56 | GET "/favicon.ico"
[GIN] 2024/05/26 - 19:50:29 | 404 | 1.052µs | 165.154.100.56 | GET "/robots.txt"
[GIN] 2024/05/26 - 19:50:29 | 404 | 1.175µs | 165.154.100.56 | GET "/sitemap.xml"
[GIN] 2024/05/26 - 19:51:04 | 404 | 15.65µs | 167.94.146.52 | GET "/"
[GIN] 2024/05/26 - 19:51:14 | 404 | 1.011µs | 167.94.146.52 | GET "/"
[GIN] 2024/05/26 - 19:51:14 | 404 | 13.591µs | 167.94.146.52 | PRI "*"
[GIN] 2024/05/26 - 20:22:58 | 404 | 1.099µs | 103.56.61.144 | GET "/"
[GIN] 2024/05/26 - 20:22:58 | 404 | 954ns | 103.56.61.144 | GET "/favicon.ico"
[GIN] 2024/05/26 - 20:22:58 | 404 | 654ns | 103.56.61.144 | GET "/robots.txt"
[GIN] 2024/05/26 - 20:22:58 | 404 | 535ns | 103.56.61.144 | GET "/.well-known/security.txt"
[GIN] 2024/05/26 - 21:15:57 | 404 | 4.44µs | 175.202.13.55 | GET "/phpMyAdmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 451ns | 175.202.13.55 | GET "/phpmyadmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 393ns | 175.202.13.55 | GET "/phpMyAdmin-2.11.4/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 909ns | 175.202.13.55 | GET "/phpMyAdmin-2.11.3/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 16.434µs | 175.202.13.55 | GET "/phpMyAdmin-2.10.0.2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 537ns | 175.202.13.55 | GET "/phpMyAdmin-2.10.3/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 339ns | 175.202.13.55 | GET "/phpMyAdmin-2.8.0.2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 442ns | 175.202.13.55 | GET "/phpMyAdmin-2.10.2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 465ns | 175.202.13.55 | GET "/phpMyAdmin-2.11.9.2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:57 | 404 | 15.979µs | 175.202.13.55 | GET "/phpMyAdmin-2.11.0/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 407ns | 175.202.13.55 | GET "/phpMyAdmin-2.11.7/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 404ns | 175.202.13.55 | GET "/phpMyAdmin-2.11.1.2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 366ns | 175.202.13.55 | GET "/pma/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 585ns | 175.202.13.55 | GET "/phpMyAdmin3/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 372ns | 175.202.13.55 | GET "/myadmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 1.169µs | 175.202.13.55 | GET "/MyAdmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 440ns | 175.202.13.55 | GET "/PHPMYADMIN/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 319ns | 175.202.13.55 | GET "/mysqladmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 390ns | 175.202.13.55 | GET "/SQL/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 409ns | 175.202.13.55 | GET "/phpMyAdmin-2.5.5-pl1/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 312ns | 175.202.13.55 | GET "/phpMyAdmin-2.5.5/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:58 | 404 | 978ns | 175.202.13.55 | GET "/phpMyAdmin-2.5.4/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 353ns | 175.202.13.55 | GET "/phpMyAdmin-2.5.7-pl1/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 472ns | 175.202.13.55 | GET "/admin/pma/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 411ns | 175.202.13.55 | GET "/phpMyAdmin-2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 306ns | 175.202.13.55 | GET "/web/phpMyAdmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 391ns | 175.202.13.55 | GET "/webadmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 927ns | 175.202.13.55 | GET "/admin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 423ns | 175.202.13.55 | GET "/dbadmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 379ns | 175.202.13.55 | GET "/mysql/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 368ns | 175.202.13.55 | GET "/phpMyAdmin2/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 421ns | 175.202.13.55 | GET "/phpma/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 988ns | 175.202.13.55 | GET "/sqlweb/scripts/setup.php"
[GIN] 2024/05/26 - 21:15:59 | 404 | 474ns | 175.202.13.55 | GET "/webdb/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 444ns | 175.202.13.55 | GET "/websql/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 403ns | 175.202.13.55 | GET "/_phpMyAdmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 373ns | 175.202.13.55 | GET "/php/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 945ns | 175.202.13.55 | GET "/admin/phpmyadmin/scripts/setup.txt"
[GIN] 2024/05/26 - 21:16:00 | 404 | 15.594µs | 175.202.13.55 | GET "/db/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 504ns | 175.202.13.55 | GET "/sqlmanager/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 482ns | 175.202.13.55 | GET "/mysqlmanager/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 1.243µs | 175.202.13.55 | GET "/phpmanager/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 1.482µs | 175.202.13.55 | GET "/php-myadmin/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 1.073µs | 175.202.13.55 | GET "/phpmy-admin/scripts/setup.php"
[GIN] 2024/05/26 - 21:16:00 | 404 | 1.162µs | 175.202.13.55 | GET "/mysql-admin/scripts/setup.php"
[GIN] 2024/05/26 - 21:18:25 | 404 | 1.373µs | 12.208.125.142 | HEAD "/"
[GIN] 2024/05/26 - 21:18:25 | 404 | 780ns | 12.208.125.142 | GET "/"
[GIN] 2024/05/26 - 21:25:20 | 404 | 955ns | 185.191.126.213 | GET "/"
[GIN] 2024/05/26 - 21:27:42 | 200 | 331.315µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:27:42 | 200 | 174.526µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:27:43 | 200 | 153.062µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:27:43 | 200 | 162.818µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:22 | 200 | 190.933µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:23 | 200 | 205.477µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:23 | 200 | 117.384µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:23 | 200 | 184.912µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:43 | 200 | 110.707µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:28:44 | 200 | 96.974µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:29:23 | 200 | 113.956µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:29:23 | 200 | 94.742µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:33:21 | 200 | 445.644µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:33:21 | 200 | 163.016µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:33:22 | 200 | 108.612µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:33:22 | 200 | 186.868µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:34:21 | 200 | 92.72µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:34:23 | 200 | 96.145µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:36:40 | 200 | 256.791µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:36:40 | 200 | 229.595µs | ::1 | POST "/webhook"
[GIN] 2024/05/26 - 21:36:41 | 200 | 219.517µs | ::1 | POST "/webhook"

0 comments on commit 1c9ebdd

Please sign in to comment.