         layout.sectionInset = UIEdgeInsets(
             top: 0, left: PaymentSheetUI.defaultPadding, bottom: 0,
             right: PaymentSheetUI.defaultPadding)
-        layout.itemSize = cellSize
-        layout.minimumInteritemSpacing = 12
+        layout.minimumInteritemSpacing = minInteritemSpacing
         super.init(frame: .zero, collectionViewLayout: layout)
         self.dataSource = self
         self.delegate = self

    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
        selected = paymentMethodTypes[indexPath.item]
    }
}


}

// MARK: - Constants
private let paymentMethodLogoSize: CGSize = CGSize(width: UIView.noIntrinsicMetric, height: 12)
private let cellHeight: CGFloat = 52
private let minInteritemSpacing: CGFloat = 12

/// A carousel of Payment Method types e.g. [Card, Alipay, SEPA Debit]
class PaymentMethodTypeCollectionView: UICollectionView {
