YocoClientDelegate

Your YocoClientDelegate is a delegate that will receive information around the status of your transactions and refunds.You should set this on your YocoClient by using [YocoClient setDelegate:myDelegate]

Methods

Method

Signature

handleTransactionSuccess

-(void) handleTransactionSuccess:(YocoPaymentSuccessResponse*) response;

handleTransactionFailure

-(void) handleTransactionFailure:(YocoPaymentFailureResponse*) response;

handleRefundSuccess

-(void) handleRefundSuccess:(YocoRefundSuccessResponse*) response;

handleRefundFailure

-(void) handleRefundFailure:(YocoRefundFailureResponse*) response;

Code Example

/*
This is the implementation for a class
implementing the YocoClientDelegate protocol
*/
@implementation ExampleClientHandler
/** handle successful transaction */
-(void) handleTransactionSuccess:(
YocoPaymentSuccessResponse*) response{
NSLog(@"payment success")
}
‚Äč
/** handle failure of transaction */
-(void) handleTransactionFailure:(
YocoPaymentFailureResponse*) response{
NSLog(response.errorMessage)
}
@end