From 15968d6be303064d72f680c4788de36042de89f1 Mon Sep 17 00:00:00 2001 From: stechiu Date: Thu, 4 Apr 2024 14:20:19 -0700 Subject: [PATCH 1/4] Updated tokenization key --- .../Application/Features/PayPalWebCheckoutViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Demo/Application/Features/PayPalWebCheckoutViewController.swift b/Demo/Application/Features/PayPalWebCheckoutViewController.swift index 1190687cf1..ef00d67ca0 100644 --- a/Demo/Application/Features/PayPalWebCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalWebCheckoutViewController.swift @@ -1,10 +1,11 @@ import Foundation import UIKit import BraintreePayPal +import BraintreeCore class PayPalWebCheckoutViewController: PaymentButtonBaseViewController { - lazy var payPalClient = BTPayPalClient(apiClient: apiClient) + lazy var payPalClient = BTPayPalClient(apiClient: BTAPIClient(authorization: "sandbox_jy4fvpfg_v7x2rb226dx4pr7b")!) override func createPaymentButton() -> UIView { let payPalCheckoutButton = createButton(title: "PayPal Checkout", action: #selector(tappedPayPalCheckout)) From 202e41267f1391db391b5bead2e6669c2973a299 Mon Sep 17 00:00:00 2001 From: stechiu Date: Fri, 5 Apr 2024 13:08:34 -0700 Subject: [PATCH 2/4] Added `payPalClient` to `universalLinkFlow` method --- .../Features/PayPalWebCheckoutViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Demo/Application/Features/PayPalWebCheckoutViewController.swift b/Demo/Application/Features/PayPalWebCheckoutViewController.swift index ef00d67ca0..81863c0e3d 100644 --- a/Demo/Application/Features/PayPalWebCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalWebCheckoutViewController.swift @@ -4,8 +4,7 @@ import BraintreePayPal import BraintreeCore class PayPalWebCheckoutViewController: PaymentButtonBaseViewController { - - lazy var payPalClient = BTPayPalClient(apiClient: BTAPIClient(authorization: "sandbox_jy4fvpfg_v7x2rb226dx4pr7b")!) + lazy var payPalClient = BTPayPalClient(apiClient: apiClient) override func createPaymentButton() -> UIView { let payPalCheckoutButton = createButton(title: "PayPal Checkout", action: #selector(tappedPayPalCheckout)) @@ -89,6 +88,7 @@ class PayPalWebCheckoutViewController: PaymentButtonBaseViewController { @objc func universalLinkFlow(_ sender: UIButton) { // TODO: implement in a future PR - used here so we don't have to remove lazy instantiation // TODO: replace URL with https://braintree-ios-demo.fly.dev/braintree-payments + let payPalClient = BTPayPalClient(apiClient: BTAPIClient(authorization: "sandbox_jy4fvpfg_v7x2rb226dx4pr7b")!) let request = BTPayPalVaultRequest( userAuthenticationEmail: "sally@gmail.com", enablePayPalAppSwitch: true, From df3cb25ed6f5066c2da7af116322462426d1637b Mon Sep 17 00:00:00 2001 From: Jax DesMarais-Leder Date: Mon, 8 Apr 2024 08:16:27 -0500 Subject: [PATCH 3/4] Update Demo/Application/Features/PayPalWebCheckoutViewController.swift --- Demo/Application/Features/PayPalWebCheckoutViewController.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Demo/Application/Features/PayPalWebCheckoutViewController.swift b/Demo/Application/Features/PayPalWebCheckoutViewController.swift index 2201223f6e..a354fa7a87 100644 --- a/Demo/Application/Features/PayPalWebCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalWebCheckoutViewController.swift @@ -87,7 +87,6 @@ class PayPalWebCheckoutViewController: PaymentButtonBaseViewController { @objc func universalLinkFlow(_ sender: UIButton) { // TODO: implement in a future PR - used here so we don't have to remove lazy instantiation - // TODO: replace URL with https://braintree-ios-demo.fly.dev/braintree-payments let payPalClient = BTPayPalClient(apiClient: BTAPIClient(authorization: "sandbox_jy4fvpfg_v7x2rb226dx4pr7b")!) let request = BTPayPalVaultRequest( userAuthenticationEmail: "sally@gmail.com", From d6f6e00c69484df33c5b9f3c2c5189872d00aea2 Mon Sep 17 00:00:00 2001 From: stechiu Date: Mon, 8 Apr 2024 09:55:03 -0700 Subject: [PATCH 4/4] Addressed PR comment --- Demo/Application/Features/PayPalWebCheckoutViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Demo/Application/Features/PayPalWebCheckoutViewController.swift b/Demo/Application/Features/PayPalWebCheckoutViewController.swift index a354fa7a87..d5fbf67ed6 100644 --- a/Demo/Application/Features/PayPalWebCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalWebCheckoutViewController.swift @@ -4,6 +4,7 @@ import BraintreePayPal import BraintreeCore class PayPalWebCheckoutViewController: PaymentButtonBaseViewController { + lazy var payPalClient = BTPayPalClient(apiClient: apiClient) override func createPaymentButton() -> UIView {