Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ These are the parameteres available on the `launch` method:
| `intent` | `Optional` | `authorize`, `preferAuthorize`, `capture` - Defines the intent of this API call. This determines the desired initial state of the transaction. When used, `preferAuthorize` automatically switches to `capture` if the selected payment method doesn't support delayed capture.|
| `metadata` | `Optional` | An optional dictionary of key/values for transaction metadata. All values should be a string.|
| `paymentSource` | `Optional` | `installment`, `recurring` - Can be used to signal that Embed is used to capture the first transaction for a subscription or an installment. When used, `store` is implied to be `true` and `display` is implied to be `supportsTokenization`. This means that payment options that do not support tokenization are automatically hidden. |
| `cartItems` | `Optional` | An optional array of cart item objects, each object must define a `name`, `quantity`, and `unitAmount`. Other optional properties are `discountAmount`, `taxAmount`, `externalIdentifier`, `sku`, `productUrl`, `imageUrl`, `categories` and `productType`.|
| `cartItems` | `Optional` | An optional array of cart item objects, each object must define a `name`, `quantity`, and `unitAmount`. Other optional properties are `discountAmount`, `taxAmount`, `externalIdentifier`, `sku`, `productUrl`, `imageUrl`, `categories`, `productType` and `sellerCountry`.|
| `environment`| `Optional` | `.sandbox`, `.production`. Defaults to `.production`. When `.sandbox` is provided the URL will contain `sandbox.GR4VY_ID`. |
| `applePayMerchantId`| `Optional` | The Apple merchant ID to be used during Apple Pay transcations |
| `applePayMerchantName`| `Optional` | The name which appears in the Apple Pay dialog next to "Pay" |
Expand Down
6 changes: 4 additions & 2 deletions gr4vy-iOS/Models/Gr4vyCartItem.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Gr4vyCartItem.swift
// Gr4vy5.swift
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this comment change?

// gr4vy-ios
//

Expand All @@ -17,9 +17,10 @@ public struct Gr4vyCartItem: Codable {
var imageUrl: String? = nil
var categories: [String]? = nil
var productType: String? = nil
var sellerCountry: String? = nil

public init(name: String, quantity: Int, unitAmount: Int, discountAmount: Int? = 0, taxAmount: Int? = 0,
externalIdentifier: String? = nil, sku: String? = nil, productUrl: String? = nil, imageUrl: String? = nil, categories: [String]? = nil, productType: String? = nil) {
externalIdentifier: String? = nil, sku: String? = nil, productUrl: String? = nil, imageUrl: String? = nil, categories: [String]? = nil, productType: String? = nil, sellerCountry: String? = nil) {
self.name = name
self.quantity = quantity
self.unitAmount = unitAmount
Expand All @@ -31,5 +32,6 @@ public struct Gr4vyCartItem: Codable {
self.imageUrl = imageUrl
self.categories = categories
self.productType = productType
self.sellerCountry = sellerCountry
}
}