From 2f430836a0c86330e7cf04dd55e4a7063fd1635d Mon Sep 17 00:00:00 2001 From: Andrei Solovev Date: Thu, 2 May 2024 15:40:43 +0700 Subject: [PATCH] Clean up ChoosePaymentMethodDelegate param names --- ExampleApp/Views/ProductDetailViewController.swift | 6 +++--- OmiseSDK/Sources/ChoosePaymentMethodDelegate.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ExampleApp/Views/ProductDetailViewController.swift b/ExampleApp/Views/ProductDetailViewController.swift index 6714ed95..c2938aa3 100644 --- a/ExampleApp/Views/ProductDetailViewController.swift +++ b/ExampleApp/Views/ProductDetailViewController.swift @@ -125,12 +125,12 @@ extension ProductDetailViewController: ChoosePaymentMethodDelegate { omiseSDK.dismiss() } - func choosePaymentMethodDidComplete(with whiteLabelInstallmentSource: Source, token: Token) { - print("White-label installment payment Token is created with id '\(token.id)', Source id: '\(whiteLabelInstallmentSource.id)'") + func choosePaymentMethodDidComplete(with source: Source, token: Token) { + print("White-label installment payment Token is created with id '\(token.id)', Source id: '\(source.id)'") omiseSDK.dismiss { let alertController = UIAlertController( title: "Token & Source Created", - message: "A token with id of \(token.id) and source with id of \(whiteLabelInstallmentSource.id) was successfully created. Please send this id to server to create a charge.", + message: "A token with id of \(token.id) and source with id of \(source.id) was successfully created. Please send this id to server to create a charge.", preferredStyle: .alert ) let okAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) diff --git a/OmiseSDK/Sources/ChoosePaymentMethodDelegate.swift b/OmiseSDK/Sources/ChoosePaymentMethodDelegate.swift index 624a755d..03cd504b 100644 --- a/OmiseSDK/Sources/ChoosePaymentMethodDelegate.swift +++ b/OmiseSDK/Sources/ChoosePaymentMethodDelegate.swift @@ -4,7 +4,7 @@ import Foundation public protocol ChoosePaymentMethodDelegate: AnyObject { func choosePaymentMethodDidComplete(with source: Source) func choosePaymentMethodDidComplete(with token: Token) - func choosePaymentMethodDidComplete(with whiteLabelInstallmentSource: Source, token: Token) + func choosePaymentMethodDidComplete(with source: Source, token: Token) func choosePaymentMethodDidComplete(with error: Error) func choosePaymentMethodDidCancel() }