#import"ViewController.h"#import"CardIO.h"@interface Viewcontroller ()<CardIOPaymentViewControllerDelegate>@end @implementation Viewcontroller- (void) viewdidload {[Super viewdidload]; UIButton* BTN =[UIButton Buttonwithtype:uibuttontypecustom]; Btn.frame= CGRectMake ( -, -, -, -); Btn.backgroundcolor=[Uicolor Cyancolor]; [Btn addtarget:self Action: @selector (PRESSBTN) forcontrolevents:uicontroleventtouchupinside]; [Self.view addsubview:btn];}-(void) pressbtn{Cardiopaymentviewcontroller*scanviewcontroller =[[Cardiopaymentviewcontroller alloc] initwithpaymentdelegate:self]; Scanviewcontroller.modalpresentationstyle=Uimodalpresentationformsheet; [Self Presentviewcontroller:scanviewcontroller animated:yes completion:nil]; }#pragmamark-cardiopaymentviewcontrollerdelegate-(void) Userdidprovidecreditcardinfo: (cardiocreditcardinfo *) Info inpaymentviewcontroller: (Cardiopaymentviewcontroller *) Paymentviewcontroller {NSLog (@"Scan succeeded with info:%@", info); //Do whatever needs to is done to deliver the purchased items.[self dismissviewcontrolleranimated:yes completion:nil]; UILabel* label =[[UILabel alloc]init]; Label.frame= CGRectMake ( -, -, -, -); Label.text= [NSString stringWithFormat:@"Received Card Info. Number:%@, expiry:%02lu/%lu, CVV:%@.", Info.redactedcardnumber, (unsignedLong) Info.expirymonth, (unsignedLong) Info.expiryyear, INFO.CVV];}- (void) Userdidcancelpaymentviewcontroller: (Cardiopaymentviewcontroller *) Paymentviewcontroller {NSLog (@"User cancelled Scan"); [Self Dismissviewcontrolleranimated:yes completion:nil];}-(void) Viewwillappear: (BOOL) animated{[cardioutilities preload];}
Photo Identification Bank card number