Skip to content

Commit

Permalink
feat: add radom checkout session integration for new orders (#2627)
Browse files Browse the repository at this point in the history
* feat: add radom checkout session integration for new orders

* test: add no metadata test order item req

* style: add new line to slice init in radom gateway

* fix: set radom authorization header without bearer prefix

* fix: rectify skus model tests after rebase

* refactor: rename method createRadomSessID to createRadomSession

* refactor: address comments

* fix imports
* update gateway to pointer
* update radom checkout session request to pointer
* rename order items to line items function
* add radom product id getter on metadata

* refactor: remove unused variable emptyCreateCheckoutSessionResp

* refactor: remove unnecessary convert to UTC

* refactor: sort imports

* refactor: remove unused func mustDecimalFromString

* feat: handle radom webhook events (#2640)

* feat: add radom checkout session integration for new orders

* fix: rectify skus model tests after rebase

* refactor: address comments

* fix imports
* update gateway to pointer
* update radom checkout session request to pointer
* rename order items to line items function
* add radom product id getter on metadata

* feat: add radom checkout session integration for new orders

* feat: handle radom webhook events

* test: remove duplicate test and fix pointer after rebase

* feat: set radom webhook verification key

* refactor: use pointers for radom events

* refactor: fix import order skus controller

* refactor: simplify radom event processing checks

* style: fix parse apostrophe

* refactor: use pointer for radom subscription response

* refactor: remove call to error when calling err on logging

* refactor: use index directly on radom mdata

* refactor: make radom action error naming less generic

* refactor: use pointer for service in test

* refactor: sort imports in radom.go

* refactor: update radom empty payments error message

* style: return from func call opposed to explicit return nil

* refactor: use string in radom get subscription

* refactor: add on conflict do nothing to order history insert statement

* refactor: rename radom event to radom notification

* test: remove duplicate test after rebase
  • Loading branch information
clD11 authored Sep 11, 2024
1 parent be56e4a commit e3b825a
Show file tree
Hide file tree
Showing 17 changed files with 2,755 additions and 703 deletions.
50 changes: 0 additions & 50 deletions libs/clients/radom/instrumented.go

This file was deleted.

20 changes: 0 additions & 20 deletions libs/clients/radom/mock.go

This file was deleted.

212 changes: 0 additions & 212 deletions libs/clients/radom/radom.go

This file was deleted.

11 changes: 0 additions & 11 deletions libs/context/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,6 @@ const (
// DisableSolanaLinkingCTXKey - this informs if solana linking is enabled
DisableSolanaLinkingCTXKey CTXKey = "disable_solana_linking"

// RadomWebhookSecretCTXKey - the webhook secret key for radom integration
RadomWebhookSecretCTXKey CTXKey = "radom_webhook_secret"
// RadomEnabledCTXKey - this informs if radom is enabled
RadomEnabledCTXKey CTXKey = "radom_enabled"
// RadomSellerAddressCTXKey is the seller address on radom
RadomSellerAddressCTXKey CTXKey = "radom_seller_address"
// RadomServerCTXKey is the server address on radom
RadomServerCTXKey CTXKey = "radom_server"
// RadomSecretCTXKey is the server secret on radom
RadomSecretCTXKey CTXKey = "radom_secret"

// stripe related keys

// StripeEnabledCTXKey - this informs if stripe is enabled
Expand Down
7 changes: 0 additions & 7 deletions services/grant/cmd/grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,6 @@ func GrantServer(
ctx = context.WithValue(ctx, appctx.StripeWebhookSecretCTXKey, viper.GetString("stripe-webhook-secret"))
ctx = context.WithValue(ctx, appctx.StripeSecretCTXKey, viper.GetString("stripe-secret"))

// Variables for Radom.
ctx = context.WithValue(ctx, appctx.RadomEnabledCTXKey, viper.GetBool("radom-enabled"))
ctx = context.WithValue(ctx, appctx.RadomWebhookSecretCTXKey, viper.GetString("radom-webhook-secret"))
ctx = context.WithValue(ctx, appctx.RadomSecretCTXKey, viper.GetString("radom-secret"))
ctx = context.WithValue(ctx, appctx.RadomServerCTXKey, viper.GetString("radom-server"))
ctx = context.WithValue(ctx, appctx.RadomSellerAddressCTXKey, viper.GetString("radom-seller-address"))

// require country present from uphold txs
ctx = context.WithValue(ctx, appctx.RequireUpholdCountryCTXKey, viper.GetBool("require-uphold-destination-country"))

Expand Down
Loading

0 comments on commit e3b825a

Please sign in to comment.