/
CreditCardViewController.h
59 lines (45 loc) · 1.98 KB
/
CreditCardViewController.h
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
48
49
50
51
52
53
54
55
56
57
58
59
//
// CreditCardViewController.h
// AuthnetLab
//
// Created by Shankar Gosain on 07/23/14.
// Copyright (c) 2014. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "DecimalKeypadView.h"
#import "CreditCardType.h"
#import "AuthNet.h"
@interface CreditCardViewController : UIViewController<DecimalKeypadViewDelegate,AuthNetDelegate,UITextFieldDelegate,UIAlertViewDelegate>
@property (nonatomic, strong) IBOutlet DecimalKeypadView *keypad;
@property (nonatomic, assign) UIActivityIndicatorView *activityIndicator;
@property (nonatomic, strong) IBOutlet UITextField *creditCardTextField;
@property (nonatomic, strong) IBOutlet UITextField *expirationTextField;
@property (nonatomic, strong) IBOutlet UITextField *cvv2TextField;
@property (nonatomic, strong) IBOutlet UITextField *zipTextField;
@property (nonatomic, strong) IBOutlet UIButton *signAuthButton;
@property (nonatomic, strong) IBOutlet UIButton *swipeNowButton;
@property (nonatomic, strong) NSString *creditCardBuf;
@property (nonatomic, strong) NSString *expirationBuf;
@property (nonatomic, strong) NSString *sessionToken;
@property (nonatomic, strong) UITextField *currentField;
// Designated initalizer
// -- this view is only meant to be put in nibs.
// (Although it would be easy to modify it to be instantiated in code.)
//- (id)initWithCoder:(NSCoder *)aDecoder;
- (IBAction)onClickLogoutPressed:(id)sender;
- (IBAction) infoPressed;
- (IBAction) swipePressed;
- (IBAction) continuePressed;
- (IBAction)onClickBarItemInfo:(id)sender;
// Called during view load to initialize the view
//- (void)initializeViews:(DecimalKeypadView *)keypad;
// Called to clear the input fields
- (void)clearInputFields;
// Returns expiration data without separator
- (NSString*) expirationDateWithoutSeparator;
@end
//@protocol CreditCardInfoViewDelegate
//@required
//- (void)creditCardInfoView:(CreditCardInfoView *)sender continuePressed:(UIButton *)button;
//- (void)creditCardInfoView:(CreditCardInfoView *)sender swipePressed:(UIButton *)button;
//@end