Skip to content

Commit

Permalink
Add comments that required experienceContext for PayPal vault option …
Browse files Browse the repository at this point in the history
…in order create not used in SDK
  • Loading branch information
KunJeongPark committed Nov 29, 2023
1 parent 62480f6 commit 52a662f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Demo/Demo/Models/CreateOrderParams.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct VaultPayPal: Encodable {

struct ExperienceContext: Encodable {

// these fields are not encoded for our SDK but are required for create order with PayPal vault option
let returnURL: String
let cancelURL: String
}
Expand Down
1 change: 1 addition & 0 deletions Demo/Demo/ViewModels/PayPalWebViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class PayPalWebViewModel: ObservableObject, PayPalWebCheckoutDelegate {
customerType: "CONSUMER"
)
)
// The returnURL is not used in our mobile SDK, but a required field for create order with PayPal payment source.
let paypal = VaultPayPal(attributes: attributes, experienceContext: ExperienceContext(returnURL: "https://example.com/returnUrl", cancelURL: "https://example.com/cancelUrl"))
vaultPayPalPaymentSource = VaultPayPalPaymentSource(paypal: paypal)
}
Expand Down

0 comments on commit 52a662f

Please sign in to comment.