Skip to content

Commit

Permalink
voucher mill added
Browse files Browse the repository at this point in the history
  • Loading branch information
stoilkov committed Oct 19, 2013
1 parent d072fbb commit d638829
Show file tree
Hide file tree
Showing 175 changed files with 8,873 additions and 0 deletions.
21 changes: 21 additions & 0 deletions samples/vouchermill/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
# Exclude the build directory
build/*

# Exclude temp nibs and swap files
*~.nib
*.swp

# Exclude OS X folder attributes
.DS_Store

# Exclude user-specific XCode 3 and 4 files
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
xcuserdata
*/UserInterfaceState.xcuserstate
*.xcuserdatad
Binary file added samples/vouchermill/Default-568h@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/vouchermill/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/vouchermill/Default@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added samples/vouchermill/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/vouchermill/Icon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//
// PMClient.h
// PayMillSDK
//
// Created by PayMill on 3/20/13.
// Copyright (c) 2013 PayMill. All rights reserved.
//
/**
This object represents Client PayMill API Object.
*/
@interface PMClient : NSObject
/**
id
*/
@property(nonatomic, strong) NSString *id;
/**
email
*/
@property(nonatomic, strong) NSString *email;
/**
description
*/
@property(nonatomic, strong) NSString *description;
/**
created_at
*/
@property(nonatomic, strong) NSString *created_at;
/**
updated_at
*/
@property(nonatomic, strong) NSString *updated_at;
/**
payments
*/
@property(nonatomic, strong) NSArray *payments;
/**
subscription
*/
@property(nonatomic, strong) NSString *subsctription;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// PMError.h
// PayMillSDK
//
// Created by PayMill on 2/20/13.
// Copyright (c) 2013 PayMill. All rights reserved.
//
#import <Foundation/Foundation.h>

/**
Error type
*/
typedef NS_ENUM(NSInteger, PMErrorType){
WRONG_PARMETERS,
HTTP_CONNECTION,
API,
NOT_INIT,
INTERNAL,
};
/**
This is the error object that is returned in every unsuccessful asynchronous callback. There are several types of this error. A detail message may also exist.
*/
@interface PMError : NSObject
/**
error type
*/
@property (nonatomic) PMErrorType type;
/**
error message
*/
@property (nonatomic, strong) NSString* message;
/**
Creates new PMError with a type and empty message.
@param type error type
@param message error message
@return PMError successfully created object.
*/
+(PMError*) newPMErrorWithType:(PMErrorType)type message:(NSString*)message;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// PMFactory.h
// PayMillSDK
//
// Created by PayMill on 3/1/13.
// Copyright (c) 2013 PayMill. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PMPaymentMethod.h"
#import "PMPaymentParams.h"
#import "PMError.h"
/**
Use only this factory class to create a PMPaymentMethod and PMPaymentParams.
*/
@interface PMFactory : NSObject
/**
Generates a PaymentMethod from credit card details.
@param accHolder credit card account holder
@param cardNumber credit card number
@param expiryMonth credit card expiry month
@param expiryYear credit card expiry year
@param verification credit card verification number
@param error PMError object
@return PMPaymentMethod successfully created object
*/
+ (id<PMPaymentMethod>)genCardPaymentWithAccHolder:(NSString*)accHolder cardNumber:(NSString*)cardNumber expiryMonth:(NSString*) expiryMonth expiryYear:(NSString*)expiryYear verification:(NSString*)verification error:(PMError **)error;
/**
Generates a PaymentMethod from direct debit payment details.
@param accountNumber account number
@param accountBank bank code
@param accountHolder first and second name of the account holder
@param accountCountry ISO 3166-2 formatted country code
@param error PMError object
@return PMPaymentMethod successfully created object
*/
+ (id<PMPaymentMethod>)genNationalPaymentWithAccNumber:(NSString *)accountNumber accBank:(NSString *)accountBank accHolder:(NSString *)accountHolder accCountry:(NSString *)accountCountry error:(PMError **)error;
/**
Use this method to generate the PaymentParams object, needed for creating transactions, preauthorizations and tokens.
@param currency Three character ISO 4217 formatted currency code.
@param amount amount (in cents) which will be charged
@param description a short description for the transaction (e.g. shopping cart ID) or empty string or null.
Note: You don't need to supply a description parameter when generating a token
@param error PMError object
@return PMPaymentParams successfully created object
*/
+ (PMPaymentParams*)genPaymentParamsWithCurrency:(NSString*)currency amount:(int)amount description:(NSString*)description error:(PMError **)error;
@end
Loading

0 comments on commit d638829

Please sign in to comment.