PaymentComponentDelegate
public protocol PaymentComponentDelegate : AnyObject
Describes the methods a delegate of the payment component needs to implement.
-
Invoked when the payment component finishes, typically by a user submitting their payment details.
Declaration
Swift
func didSubmit(_ data: PaymentComponentData, from component: PaymentComponent)
Parameters
data
The data supplied by the payment component.
component
The payment component from which the payment details were submitted.
-
Invoked when the payment component fails.
Declaration
Swift
func didFail(with error: Error, from component: PaymentComponent)
Parameters
error
The error that occurred.
component
The payment component that failed.