Skip to content

Commit 09f648a

Browse files
feat: enhance payment details structure with new consent and item subtypes (#189)
1 parent f0a415a commit 09f648a

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

payments/payments.go

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ const (
182182
type StorePaymentDetailsType string
183183

184184
const (
185-
Disabled StorePaymentDetailsType = "disabled"
186-
Enabled StorePaymentDetailsType = "enabled"
185+
Disabled StorePaymentDetailsType = "disabled"
186+
Enabled StorePaymentDetailsType = "enabled"
187+
CollectConsent StorePaymentDetailsType = "collect_consent"
187188
)
188189

189190
type PaymentPurposeType string
@@ -310,22 +311,14 @@ const (
310311
TwoDayOrMore DeliveryTimeframe = "two_day_or_more"
311312
)
312313

313-
type ItemType string
314-
315-
const (
316-
DigitalIT ItemType = "digital"
317-
DiscountIT ItemType = "discount"
318-
PhysicalIT ItemType = "physical"
319-
)
320-
321314
type ItemSubType string
322315

323316
const (
324-
BlockchainIST ItemSubType = "blockchain"
325-
CbdcIST ItemSubType = "cbdc"
326-
CryptocurrencyIST ItemSubType = "cryptocurrency"
327-
NftIST ItemSubType = "nft"
328-
StablecoinIST ItemSubType = "stablecoin"
317+
Blockchain ItemSubType = "blockchain"
318+
CBDC ItemSubType = "cbdc"
319+
Cryptocurrency ItemSubType = "cryptocurrency"
320+
NFT ItemSubType = "nft"
321+
Stablecoin ItemSubType = "stablecoin"
329322
)
330323

331324
type (
@@ -602,6 +595,8 @@ type (
602595
Purpose string `json:"purpose,omitempty"`
603596
Dlocal *DLocalProcessingSettings `json:"dlocal,omitempty"`
604597
PartnerCustomerRiskData *PartnerCustomerRiskData `json:"partner_customer_risk_data,omitempty"`
598+
AffiliateId string `json:"affiliate_id,omitempty"`
599+
AffiliateUrl string `json:"affiliate_url,omitempty"`
605600
}
606601

607602
ThreeDsEnrollment struct {
@@ -638,9 +633,6 @@ type (
638633
ContinuationPayload string `json:"continuation_payload,omitempty"`
639634
Pun string `json:"pun,omitempty"`
640635
MerchantCategoryCode string `json:"merchant_category_code,omitempty"`
641-
CardType common.CardType `json:"card_type,omitempty"`
642-
AffiliateId string `json:"affiliate_id,omitempty"`
643-
AffiliateUrl string `json:"affiliate_url,omitempty"`
644636
}
645637

646638
PaymentRetryResponse struct {
@@ -702,7 +694,7 @@ type (
702694
}
703695

704696
Product struct {
705-
Type ItemType `json:"type,omitempty"`
697+
Type string `json:"type,omitempty"`
706698
SubType ItemSubType `json:"sub_type,omitempty"`
707699
Name string `json:"name,omitempty"`
708700
Quantity int `json:"quantity,omitempty"`

0 commit comments

Comments
 (0)