@@ -249,7 +249,8 @@ data CheckoutSession = CheckoutSession
249
249
csSuccessUrl :: T. Text ,
250
250
csPaymentMethodTypes :: V. Vector T. Text , -- TODO: make enum
251
251
csSubscription :: Maybe SubscriptionId ,
252
- csAllowPromotionCodes :: Maybe Bool
252
+ csAllowPromotionCodes :: Maybe Bool ,
253
+ csUrl :: T. Text
253
254
}
254
255
deriving (Show , Eq )
255
256
@@ -321,7 +322,9 @@ instance ToForm PriceCreate where
321
322
Nothing -> []
322
323
Just x ->
323
324
[ (" recurring[interval]" , [prcInterval x]),
324
- (" recurring[interval_count]" , maybeToList $ fmap toUrlPiece $ prcIntervalCount x)
325
+ ( " recurring[interval_count]" ,
326
+ maybeToList $ fmap toUrlPiece $ prcIntervalCount x
327
+ )
325
328
]
326
329
in Form $
327
330
HM. fromList $
@@ -337,7 +340,9 @@ instance ToForm SubscriptionCreate where
337
340
toForm sc =
338
341
let convertItem (idx, itm) =
339
342
[ (" items[" <> toUrlPiece idx <> " ][price]" , [toUrlPiece $ sciPrice itm]),
340
- (" items[" <> toUrlPiece idx <> " ][quantity]" , maybeToList $ toUrlPiece <$> sciQuantity itm)
343
+ ( " items[" <> toUrlPiece idx <> " ][quantity]" ,
344
+ maybeToList $ toUrlPiece <$> sciQuantity itm
345
+ )
341
346
]
342
347
lineItems =
343
348
concatMap convertItem (zip ([0 .. ] :: [Int ]) (scItems sc))
@@ -353,7 +358,9 @@ instance ToForm CheckoutSessionCreate where
353
358
toForm csc =
354
359
let convertItem (idx, itm) =
355
360
[ (" line_items[" <> toUrlPiece idx <> " ][price]" , [toUrlPiece $ cscliPrice itm]),
356
- (" line_items[" <> toUrlPiece idx <> " ][quantity]" , [toUrlPiece $ cscliQuantity itm])
361
+ ( " line_items[" <> toUrlPiece idx <> " ][quantity]" ,
362
+ [toUrlPiece $ cscliQuantity itm]
363
+ )
357
364
]
358
365
lineItems =
359
366
concatMap convertItem (zip ([0 .. ] :: [Int ]) (cscLineItems csc))
@@ -370,7 +377,9 @@ instance ToForm CheckoutSessionCreate where
370
377
(" mode" , [cscMode csc]),
371
378
(" client_reference_id" , maybeToList $ cscClientReferenceId csc),
372
379
(" customer" , maybeToList $ fmap toUrlPiece $ cscCustomer csc),
373
- (" allow_promotion_codes" , maybeToList $ toUrlPiece <$> cscAllowPromotionCodes csc)
380
+ ( " allow_promotion_codes" ,
381
+ maybeToList $ toUrlPiece <$> cscAllowPromotionCodes csc
382
+ )
374
383
]
375
384
<> lineItems
376
385
<> pmt
0 commit comments