PAY TAB
PayTab payment tool provides SDK for IOS, for that we need to register on their site for accessing the key value. after installing the SDK ,
need to Follow some steps.
1: first we need to initialize their view controller.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
- (IBAction)click:(id)sender { PayTabCardReaderViewController *view1; if (IS_IPAD) { view1 = [[PayTabCardReaderViewController alloc] initWithNibName:@"PayTabCardReaderViewControllerWideScreen" bundle:nil]; } else { view1 = [[PayTabCardReaderViewController alloc] initWithNibName:@"PayTabCardReaderViewController_iPhone" bundle:nil]; } view1.cc_card_name = @" "; view1.cc_card_number = @" "; view1.cc_card_expiry_mon = @" "; view1.cc_card_expiry_year = @" "; bt = view1.goBackButton; view1.tag_amount =@"1.105"; // hamari gin@ view1.tag_title = @"Hotel"; // hotel i anun@ view1.tag_currency = @"USD"; // currency - n view1.sdklanguage = @"en"; view1.tag_tax = @"0.0"; view1.shipping_address = @"ManamaBahrain"; view1.shipping_city = @"Manama"; view1.shiping_country = @"BH"; view1.shipping_state = @"Mana"; view1.shipping_zip_code = @"009"; view1.billing_address = @"ManamaBahrain"; view1.billing_city = @"Manama"; view1.billing_country = @"BHR"; view1.billing_state = @"Manama"; view1.billing_zip_code = @"00973"; //view1.order_id = @"1233312512"; view1.phonenum = @"9614503592"; view1.customer_email = @"abcdef@yahoo.com"; view1.tag_merchant_email = @"kunal.prasad@webkul.com"; //view1.timerFlag = 20100;//seconds view1.secretKey = @"4Fjt1SsqqyZr1Co2i4snvxcfVAykqEjvjDYlvqLWZLo1nM3GQv3l3gBZRajhODM8gLtMcfIc07dnTh4KM76QoIPfS9wHNjP35iPi"; //view1.tag_original_assignee_code = @"SDK"; // booking id - n payTab = @"true"; [self presentViewController:view1 animated:YES completion:nil]; } |
Note: here secret key – you will get after registering on their site.
2: for accessing their result you need to define the method like that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
-(void)viewDidAppear:(BOOL)animated{ //if([payTab isEqualToString:@"true"]){ NSLog(@"transaction Id %@", [[NSUserDefaults standardUserDefaults] objectForKey:@"pt_transaction_id"]); NSLog(@"Response Code %@", [[NSUserDefaults standardUserDefaults] objectForKey:@"pt_response_code"]); NSLog(@"Description%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"pt_description"]); NSLog(@" %d",[bt isSelected]); //} } |
3: you will get response code as well as the description.
or you can read their document for further details.