@@ -121,7 +121,7 @@ class PayKitViewController: UIViewController {
121121 updateRequestButton. isEnabled = ( pendingRequest != nil )
122122 authorizeRequestButton. isEnabled = ( pendingRequest != nil )
123123 amountTextField. isEnabled = ( paymentType == . ONE_TIME_PAYMENT)
124- accountReferenceIDTextField. isEnabled = ( paymentType == . ON_FILE_PAYMENT )
124+ accountReferenceIDTextField. isEnabled = ( paymentType != . ONE_TIME_PAYMENT )
125125 endpointLabel. text = environment. title
126126 }
127127
@@ -176,6 +176,8 @@ extension PayKitViewController {
176176 action = . oneTimePayment( scopeID: brandID, money: amount)
177177 case . ON_FILE_PAYMENT:
178178 action = . onFilePayment( scopeID: brandID, accountReferenceID: accountReferenceIDTextField. text)
179+ case . ON_FILE_PAYOUT:
180+ action = . onFilePayout( scopeID: brandID, accountReferenceID: accountReferenceIDTextField. text)
179181 }
180182
181183 return CreateCustomerRequestParams (
@@ -193,6 +195,8 @@ extension PayKitViewController {
193195 action = . oneTimePayment( scopeID: brandID, money: amount)
194196 case . ON_FILE_PAYMENT:
195197 action = . onFilePayment( scopeID: brandID, accountReferenceID: accountReferenceIDTextField. text)
198+ case . ON_FILE_PAYOUT:
199+ action = . onFilePayout( scopeID: brandID, accountReferenceID: accountReferenceIDTextField. text)
196200 }
197201
198202 return UpdateCustomerRequestParams (
@@ -299,7 +303,11 @@ extension PayKitViewController {
299303 handler: handlePaymentTypeControlChanged
300304 ) ,
301305 UIAction (
302- title: " On File " ,
306+ title: " On File Payment " ,
307+ handler: handlePaymentTypeControlChanged
308+ ) ,
309+ UIAction (
310+ title: " On File Payout " ,
303311 handler: handlePaymentTypeControlChanged
304312 ) ,
305313 ] )
0 commit comments