motion_stripe 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .DS_Store
19
+ *.DS_Store
File without changes
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in motion_stripe.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Scott Ballantyne
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # MotionStripe
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'motion_stripe'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install motion_stripe
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ $:.unshift("/Library/RubyMotion/lib")
3
+ require 'motion/project'
4
+ Bundler.setup
5
+ Bundler.require
@@ -0,0 +1,15 @@
1
+ require "motion_stripe/version"
2
+
3
+ Motion::Project::App.setup do |app|
4
+ Dir.glob(File.join(File.dirname(__FILE__), 'motion_stripe/*.rb')).each do |file|
5
+ app.files.unshift(file)
6
+ end
7
+ stripe_vendor = File.expand_path(File.join(File.dirname(__FILE__), '../vendor/stripe-ios/'))
8
+ app.vendor_project(stripe_vendor, :static, :headers_dir => 'src')
9
+ end
10
+
11
+ module Stripe
12
+
13
+ end
14
+
15
+ require 'motion_stripe/stripe'
@@ -0,0 +1,27 @@
1
+ module Stripe
2
+ def self.client(key)
3
+ StripeConnection.connectionWithPublishableKey(key)
4
+ end
5
+
6
+ def self.card(number, name, sec_code, exp_month, exp_year)
7
+ card = StripeCard.alloc.init
8
+ card.number = number
9
+ card.name = name
10
+ card.securityCode = sec_code
11
+ card.expiryMonth = NSNumber.numberWithInteger(exp_month)
12
+ card.expiryYear = NSNumber.numberWithInteger(exp_year)
13
+ card
14
+ end
15
+
16
+ def self.charge(stripe_client, card)
17
+ stripe_client.performRequestWithCard(card, success: Stripe.success, error: Stripe.error)
18
+ end
19
+
20
+ def self.error(error_respose)
21
+ puts error_response
22
+ end
23
+
24
+ def self.success(token)
25
+ puts token
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module MotionStripe
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'motion_stripe/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "motion_stripe"
8
+ gem.version = MotionStripe::VERSION
9
+ gem.authors = ["Scott Ballantyne"]
10
+ gem.email = ["ussballantyne@gmail.com"]
11
+ gem.description = %q{stripe-ios wrapper for rubymotion}
12
+ gem.summary = %q{stripe-ios wrapper for rubymotion}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
@@ -0,0 +1,11 @@
1
+ build/*
2
+ *.pbxuser
3
+ *.mode1v3
4
+
5
+ .DS_Store
6
+ profile
7
+
8
+ xcuserdata
9
+
10
+ project.xcworkspace
11
+
@@ -0,0 +1,26 @@
1
+ This SDK allows you to authorize a Credit Card on an iOS 5.0 device using the Stripe API.
2
+
3
+ Usage is a simple asynchronous call:
4
+
5
+ #import "Stripe.h"
6
+
7
+ StripeConnection *stripe = [StripeConnection connectionWithPublishableKey:@"pk_dl4LcpeAxUEPHN3FxzuAQQmhCGmx5"];
8
+
9
+ StripeCard *card = [[StripeCard alloc] init];
10
+ card.number = @"4111111111111111";
11
+ card.name = @"Bob Dylan";
12
+ card.securityCode = "010";
13
+ card.expiryMonth = [NSNumber numberWithInteger:2];
14
+ card.expiryYear = [NSNumber numberWithInteger:2014];
15
+
16
+ [stripe performRequestWithCard:card
17
+ success:^(StripeResponse *token)
18
+ {
19
+ /* handle success */
20
+ }
21
+ error:^(NSError *error)
22
+ {
23
+ /* handle failure */
24
+ }];
25
+
26
+ Please build the "example" target for an example of it in action.
@@ -0,0 +1,45 @@
1
+ #define kStripeAPIBase @"https://%@:@api.stripe.com/v1"
2
+ #define kStripeTokenPath @"tokens"
3
+
4
+ @interface StripeCard : NSObject
5
+
6
+ @property (strong, nonatomic) NSString *number;
7
+ @property (strong, nonatomic) NSNumber *expiryMonth;
8
+ @property (strong, nonatomic) NSNumber *expiryYear;
9
+ @property (strong, nonatomic) NSString *securityCode;
10
+ @property (strong, nonatomic) NSString *name;
11
+ @property (strong, nonatomic) NSString *addressLine1;
12
+ @property (strong, nonatomic) NSString *addressLine2;
13
+ @property (strong, nonatomic) NSString *addressZip;
14
+ @property (strong, nonatomic) NSString *addressState;
15
+ @property (strong, nonatomic) NSString *addressCountry;
16
+
17
+ @property (strong, readonly) NSString *country;
18
+ @property (strong, readonly) NSString *cvcCheck;
19
+ @property (strong, readonly) NSString *lastFourDigits;
20
+ @property (strong, readonly) NSString *type;
21
+
22
+ - (id)initWithResponseDictionary:(NSDictionary *)card;
23
+
24
+ @end
25
+
26
+ @interface StripeResponse : NSObject
27
+ @property (strong, nonatomic) NSNumber *createdAt;
28
+ @property (strong, nonatomic) NSString *currency;
29
+ @property (strong, nonatomic) NSNumber *amount;
30
+ @property (nonatomic) BOOL isUsed;
31
+ @property (nonatomic) BOOL isLiveMode;
32
+ @property (strong, nonatomic) NSString *token;
33
+ @property (strong, nonatomic) StripeCard *card;
34
+
35
+ - (id)initWithResponseDictionary:(NSDictionary *)response;
36
+ @end
37
+
38
+ @interface StripeConnection : NSObject
39
+
40
+ + (StripeConnection *)connectionWithPublishableKey:(NSString *)publishableKey;
41
+ - (id)initWithPublishableKey:(NSString *)publishableKey;
42
+ - (void)performRequestWithCard:(StripeCard *)card success:(void (^)(StripeResponse *response))success error:(void (^)(NSError *error))error;
43
+
44
+ @end
45
+
@@ -0,0 +1,146 @@
1
+ #import "Stripe.h"
2
+
3
+ @interface StripeCard ()
4
+ @property (readonly) NSDictionary *attributes;
5
+ @property (strong, readwrite) NSString *country;
6
+ @property (strong, readwrite) NSString *cvcCheck;
7
+ @property (strong, readwrite) NSString *lastFourDigits;
8
+ @property (strong, readwrite) NSString *type;
9
+ @end
10
+
11
+ @interface StripeConnection ()
12
+ @property (strong, nonatomic) NSString *publishableKey;
13
+ @end
14
+
15
+ @implementation StripeConnection
16
+ @synthesize publishableKey = _publishableKey;
17
+
18
+ + (StripeConnection *)connectionWithPublishableKey:(NSString *)publishableKey {
19
+ return [[self alloc] initWithPublishableKey:publishableKey];
20
+ }
21
+
22
+ - (id)initWithPublishableKey:(NSString *)publishableKey {
23
+ if ((self = [super init])) {
24
+ self.publishableKey = publishableKey;
25
+ }
26
+
27
+ return self;
28
+ }
29
+
30
+ - (NSString *)escapedString:(NSString *)string {
31
+ return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,
32
+ (__bridge CFStringRef)string,
33
+ NULL,
34
+ (CFStringRef)@"!*'();:@&=+$,/?%#[]",
35
+ kCFStringEncodingUTF8 );
36
+ }
37
+
38
+ - (NSData *)HTTPBodyWithCard:(StripeCard *)card {
39
+ NSMutableString *body = [NSMutableString string];
40
+ NSDictionary *attributes = card.attributes;
41
+
42
+ for (NSString *key in attributes) {
43
+ NSString *value = [attributes objectForKey:key];
44
+ if ((id)value == [NSNull null]) continue;
45
+
46
+ if (body.length != 0)
47
+ [body appendString:@"&"];
48
+
49
+ if ([value isKindOfClass:[NSString class]])
50
+ value = [self escapedString:value];
51
+
52
+ [body appendFormat:@"card[%@]=%@", [self escapedString:key], value];
53
+ }
54
+
55
+ return [body dataUsingEncoding:NSUTF8StringEncoding];
56
+ }
57
+
58
+ - (void)performRequestWithCard:(StripeCard *)card success:(void (^)(StripeResponse *response))success error:(void (^)(NSError *error))error {
59
+ NSURL *url = [[NSURL URLWithString:
60
+ [NSString stringWithFormat:kStripeAPIBase, [self escapedString:self.publishableKey]]]
61
+ URLByAppendingPathComponent:kStripeTokenPath];
62
+
63
+ NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
64
+ request.HTTPBody = [self HTTPBodyWithCard:card];
65
+
66
+ [request setHTTPMethod:@"POST"];
67
+
68
+ [NSURLConnection sendAsynchronousRequest:request
69
+ queue:[NSOperationQueue mainQueue]
70
+ completionHandler:^(NSURLResponse *response, NSData *body, NSError *requestError)
71
+ {
72
+ if (!response && requestError) {
73
+ if ([requestError.domain isEqualToString:@"NSURLErrorDomain"] &&
74
+ requestError.code == NSURLErrorUserCancelledAuthentication) {
75
+ error([NSError errorWithDomain:@"Stripe" code:0 userInfo:
76
+ [NSDictionary dictionaryWithObject:@"Authentication failed" forKey:@"message"]]);
77
+ } else
78
+ error(requestError);
79
+
80
+ return;
81
+ }
82
+
83
+ NSDictionary *unserialized = [NSJSONSerialization JSONObjectWithData:body options:0 error:NULL];
84
+ if ([(NSHTTPURLResponse *)response statusCode] == 200) {
85
+ StripeResponse *stripeResponse = [[StripeResponse alloc] initWithResponseDictionary:unserialized];
86
+
87
+ success(stripeResponse);
88
+ } else {
89
+ error([NSError errorWithDomain:@"Stripe" code:0 userInfo:[unserialized objectForKey:@"error"]]);
90
+ }
91
+ }];
92
+ }
93
+
94
+ @end
95
+
96
+
97
+ @implementation StripeCard
98
+ @synthesize number, expiryMonth, expiryYear, securityCode, name, addressLine1, addressLine2, addressZip, addressState, addressCountry, country, cvcCheck, lastFourDigits, type;
99
+
100
+ - (NSDictionary *)attributes {
101
+ return [NSDictionary dictionaryWithObjectsAndKeys:
102
+ self.number ? self.number : [NSNull null], @"number",
103
+ self.expiryMonth ? self.expiryMonth : [NSNull null], @"exp_month",
104
+ self.expiryYear ? self.expiryYear : [NSNull null], @"exp_year",
105
+ self.securityCode ? self.securityCode : [NSNull null], @"cvc",
106
+ self.name ? self.name : [NSNull null], @"name",
107
+ self.addressLine1 ? self.addressLine1 : [NSNull null], @"address_line1",
108
+ self.addressLine2 ? self.addressLine2 : [NSNull null], @"address_line2",
109
+ self.addressZip ? self.addressZip : [NSNull null], @"address_zip",
110
+ self.addressState ? self.addressState : [NSNull null], @"address_state",
111
+ self.addressCountry ? self.addressCountry : [NSNull null], @"address_country",
112
+ nil];
113
+ }
114
+
115
+ - (id)initWithResponseDictionary:(NSDictionary *)card {
116
+ if ((self = [super init])) {
117
+ self.country = [card objectForKey:@"country"];
118
+ self.cvcCheck = [card objectForKey:@"cvc_check"];
119
+ self.expiryMonth = [card objectForKey:@"exp_month"];
120
+ self.expiryYear = [card objectForKey:@"exp_year"];
121
+ self.lastFourDigits = [card objectForKey:@"last4"];
122
+ self.type = [card objectForKey:@"type"];
123
+ }
124
+
125
+ return self;
126
+ }
127
+
128
+ @end
129
+
130
+ @implementation StripeResponse
131
+ @synthesize createdAt, amount, isUsed, isLiveMode, token, card;
132
+
133
+ - (id)initWithResponseDictionary:(NSDictionary *)response {
134
+ if ((self = [super init])) {
135
+ self.createdAt = [response objectForKey:@"created"];
136
+ self.isUsed = [[response objectForKey:@"used"] boolValue];
137
+ self.amount = [response objectForKey:@"amount"];
138
+ self.isLiveMode = [[response objectForKey:@"livemode"] boolValue];
139
+ self.token = [response objectForKey:@"id"];
140
+ self.card = [[StripeCard alloc] initWithResponseDictionary:[response objectForKey:@"card"]];
141
+ }
142
+
143
+ return self;
144
+ }
145
+
146
+ @end
@@ -0,0 +1,7 @@
1
+ //
2
+ // Prefix header for all source files of the 'stripe-ios' target in the 'stripe-ios' project
3
+ //
4
+
5
+ #ifdef __OBJC__
6
+ #import <Foundation/Foundation.h>
7
+ #endif
@@ -0,0 +1,393 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 3B9FA3FC144AA9CE004D6067 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9FA3FB144AA9CE004D6067 /* Foundation.framework */; };
11
+ 3B9FA40E144AAA5F004D6067 /* Stripe.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B9FA40C144AAA5F004D6067 /* Stripe.h */; };
12
+ 3B9FA40F144AAA5F004D6067 /* Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9FA40D144AAA5F004D6067 /* Stripe.m */; };
13
+ 3B9FA41A144AACAF004D6067 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9FA419144AACAF004D6067 /* UIKit.framework */; };
14
+ 3B9FA41B144AACAF004D6067 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9FA3FB144AA9CE004D6067 /* Foundation.framework */; };
15
+ 3B9FA41D144AACAF004D6067 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9FA41C144AACAF004D6067 /* CoreGraphics.framework */; };
16
+ 3B9FA435144AAD01004D6067 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9FA430144AAD01004D6067 /* main.m */; };
17
+ 3B9FA437144AAD01004D6067 /* STAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9FA434144AAD01004D6067 /* STAppDelegate.m */; };
18
+ 3B9FA438144AAD6E004D6067 /* libstripe-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9FA3F8144AA9CE004D6067 /* libstripe-ios.a */; };
19
+ 3B9FA442144AAE13004D6067 /* STRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9FA441144AAE13004D6067 /* STRootViewController.m */; };
20
+ 3B9FA453144AC62B004D6067 /* STCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9FA451144AC62B004D6067 /* STCardViewController.m */; };
21
+ 3B9FA454144AC62B004D6067 /* STCardViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B9FA452144AC62B004D6067 /* STCardViewController.xib */; };
22
+ /* End PBXBuildFile section */
23
+
24
+ /* Begin PBXContainerItemProxy section */
25
+ 3B9FA439144AAD73004D6067 /* PBXContainerItemProxy */ = {
26
+ isa = PBXContainerItemProxy;
27
+ containerPortal = 3B9FA3EF144AA9CE004D6067 /* Project object */;
28
+ proxyType = 1;
29
+ remoteGlobalIDString = 3B9FA3F7144AA9CE004D6067;
30
+ remoteInfo = "stripe-ios";
31
+ };
32
+ /* End PBXContainerItemProxy section */
33
+
34
+ /* Begin PBXFileReference section */
35
+ 3B9FA3F8144AA9CE004D6067 /* libstripe-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libstripe-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
36
+ 3B9FA3FB144AA9CE004D6067 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
37
+ 3B9FA40A144AAA4B004D6067 /* prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefix.pch; sourceTree = "<group>"; };
38
+ 3B9FA40C144AAA5F004D6067 /* Stripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stripe.h; sourceTree = "<group>"; };
39
+ 3B9FA40D144AAA5F004D6067 /* Stripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Stripe.m; sourceTree = "<group>"; };
40
+ 3B9FA417144AACAF004D6067 /* stripe-example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "stripe-example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
41
+ 3B9FA419144AACAF004D6067 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
42
+ 3B9FA41C144AACAF004D6067 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
43
+ 3B9FA430144AAD01004D6067 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
44
+ 3B9FA431144AAD01004D6067 /* prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefix.pch; sourceTree = "<group>"; };
45
+ 3B9FA432144AAD01004D6067 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
46
+ 3B9FA433144AAD01004D6067 /* STAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STAppDelegate.h; sourceTree = "<group>"; };
47
+ 3B9FA434144AAD01004D6067 /* STAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STAppDelegate.m; sourceTree = "<group>"; };
48
+ 3B9FA440144AAE13004D6067 /* STRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STRootViewController.h; sourceTree = "<group>"; };
49
+ 3B9FA441144AAE13004D6067 /* STRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STRootViewController.m; sourceTree = "<group>"; };
50
+ 3B9FA450144AC62B004D6067 /* STCardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STCardViewController.h; sourceTree = "<group>"; };
51
+ 3B9FA451144AC62B004D6067 /* STCardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STCardViewController.m; sourceTree = "<group>"; };
52
+ 3B9FA452144AC62B004D6067 /* STCardViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = STCardViewController.xib; sourceTree = "<group>"; };
53
+ /* End PBXFileReference section */
54
+
55
+ /* Begin PBXFrameworksBuildPhase section */
56
+ 3B9FA3F5144AA9CE004D6067 /* Frameworks */ = {
57
+ isa = PBXFrameworksBuildPhase;
58
+ buildActionMask = 2147483647;
59
+ files = (
60
+ 3B9FA3FC144AA9CE004D6067 /* Foundation.framework in Frameworks */,
61
+ );
62
+ runOnlyForDeploymentPostprocessing = 0;
63
+ };
64
+ 3B9FA414144AACAF004D6067 /* Frameworks */ = {
65
+ isa = PBXFrameworksBuildPhase;
66
+ buildActionMask = 2147483647;
67
+ files = (
68
+ 3B9FA438144AAD6E004D6067 /* libstripe-ios.a in Frameworks */,
69
+ 3B9FA41A144AACAF004D6067 /* UIKit.framework in Frameworks */,
70
+ 3B9FA41B144AACAF004D6067 /* Foundation.framework in Frameworks */,
71
+ 3B9FA41D144AACAF004D6067 /* CoreGraphics.framework in Frameworks */,
72
+ );
73
+ runOnlyForDeploymentPostprocessing = 0;
74
+ };
75
+ /* End PBXFrameworksBuildPhase section */
76
+
77
+ /* Begin PBXGroup section */
78
+ 3B9FA3ED144AA9CE004D6067 = {
79
+ isa = PBXGroup;
80
+ children = (
81
+ 3B9FA408144AAA4B004D6067 /* src */,
82
+ 3B9FA42E144AAD01004D6067 /* stripe-example */,
83
+ 3B9FA3FA144AA9CE004D6067 /* Frameworks */,
84
+ 3B9FA3F9144AA9CE004D6067 /* Products */,
85
+ );
86
+ sourceTree = "<group>";
87
+ };
88
+ 3B9FA3F9144AA9CE004D6067 /* Products */ = {
89
+ isa = PBXGroup;
90
+ children = (
91
+ 3B9FA3F8144AA9CE004D6067 /* libstripe-ios.a */,
92
+ 3B9FA417144AACAF004D6067 /* stripe-example.app */,
93
+ );
94
+ name = Products;
95
+ sourceTree = "<group>";
96
+ };
97
+ 3B9FA3FA144AA9CE004D6067 /* Frameworks */ = {
98
+ isa = PBXGroup;
99
+ children = (
100
+ 3B9FA3FB144AA9CE004D6067 /* Foundation.framework */,
101
+ 3B9FA419144AACAF004D6067 /* UIKit.framework */,
102
+ 3B9FA41C144AACAF004D6067 /* CoreGraphics.framework */,
103
+ );
104
+ name = Frameworks;
105
+ sourceTree = "<group>";
106
+ };
107
+ 3B9FA408144AAA4B004D6067 /* src */ = {
108
+ isa = PBXGroup;
109
+ children = (
110
+ 3B9FA409144AAA4B004D6067 /* base */,
111
+ 3B9FA40C144AAA5F004D6067 /* Stripe.h */,
112
+ 3B9FA40D144AAA5F004D6067 /* Stripe.m */,
113
+ );
114
+ path = src;
115
+ sourceTree = "<group>";
116
+ };
117
+ 3B9FA409144AAA4B004D6067 /* base */ = {
118
+ isa = PBXGroup;
119
+ children = (
120
+ 3B9FA40A144AAA4B004D6067 /* prefix.pch */,
121
+ );
122
+ path = base;
123
+ sourceTree = "<group>";
124
+ };
125
+ 3B9FA42E144AAD01004D6067 /* stripe-example */ = {
126
+ isa = PBXGroup;
127
+ children = (
128
+ 3B9FA42F144AAD01004D6067 /* base */,
129
+ 3B9FA432144AAD01004D6067 /* Info.plist */,
130
+ 3B9FA433144AAD01004D6067 /* STAppDelegate.h */,
131
+ 3B9FA434144AAD01004D6067 /* STAppDelegate.m */,
132
+ 3B9FA440144AAE13004D6067 /* STRootViewController.h */,
133
+ 3B9FA441144AAE13004D6067 /* STRootViewController.m */,
134
+ 3B9FA450144AC62B004D6067 /* STCardViewController.h */,
135
+ 3B9FA451144AC62B004D6067 /* STCardViewController.m */,
136
+ 3B9FA452144AC62B004D6067 /* STCardViewController.xib */,
137
+ );
138
+ path = "stripe-example";
139
+ sourceTree = "<group>";
140
+ };
141
+ 3B9FA42F144AAD01004D6067 /* base */ = {
142
+ isa = PBXGroup;
143
+ children = (
144
+ 3B9FA430144AAD01004D6067 /* main.m */,
145
+ 3B9FA431144AAD01004D6067 /* prefix.pch */,
146
+ );
147
+ path = base;
148
+ sourceTree = "<group>";
149
+ };
150
+ /* End PBXGroup section */
151
+
152
+ /* Begin PBXHeadersBuildPhase section */
153
+ 3B9FA3F6144AA9CE004D6067 /* Headers */ = {
154
+ isa = PBXHeadersBuildPhase;
155
+ buildActionMask = 2147483647;
156
+ files = (
157
+ 3B9FA40E144AAA5F004D6067 /* Stripe.h in Headers */,
158
+ );
159
+ runOnlyForDeploymentPostprocessing = 0;
160
+ };
161
+ /* End PBXHeadersBuildPhase section */
162
+
163
+ /* Begin PBXNativeTarget section */
164
+ 3B9FA3F7144AA9CE004D6067 /* stripe-ios */ = {
165
+ isa = PBXNativeTarget;
166
+ buildConfigurationList = 3B9FA405144AA9CE004D6067 /* Build configuration list for PBXNativeTarget "stripe-ios" */;
167
+ buildPhases = (
168
+ 3B9FA3F4144AA9CE004D6067 /* Sources */,
169
+ 3B9FA3F5144AA9CE004D6067 /* Frameworks */,
170
+ 3B9FA3F6144AA9CE004D6067 /* Headers */,
171
+ );
172
+ buildRules = (
173
+ );
174
+ dependencies = (
175
+ );
176
+ name = "stripe-ios";
177
+ productName = "stripe-ios";
178
+ productReference = 3B9FA3F8144AA9CE004D6067 /* libstripe-ios.a */;
179
+ productType = "com.apple.product-type.library.static";
180
+ };
181
+ 3B9FA416144AACAF004D6067 /* stripe-example */ = {
182
+ isa = PBXNativeTarget;
183
+ buildConfigurationList = 3B9FA42C144AACAF004D6067 /* Build configuration list for PBXNativeTarget "stripe-example" */;
184
+ buildPhases = (
185
+ 3B9FA413144AACAF004D6067 /* Sources */,
186
+ 3B9FA414144AACAF004D6067 /* Frameworks */,
187
+ 3B9FA415144AACAF004D6067 /* Resources */,
188
+ );
189
+ buildRules = (
190
+ );
191
+ dependencies = (
192
+ 3B9FA43A144AAD73004D6067 /* PBXTargetDependency */,
193
+ );
194
+ name = "stripe-example";
195
+ productName = "stripe-example";
196
+ productReference = 3B9FA417144AACAF004D6067 /* stripe-example.app */;
197
+ productType = "com.apple.product-type.application";
198
+ };
199
+ /* End PBXNativeTarget section */
200
+
201
+ /* Begin PBXProject section */
202
+ 3B9FA3EF144AA9CE004D6067 /* Project object */ = {
203
+ isa = PBXProject;
204
+ attributes = {
205
+ LastUpgradeCheck = 0420;
206
+ };
207
+ buildConfigurationList = 3B9FA3F2144AA9CE004D6067 /* Build configuration list for PBXProject "stripe-ios" */;
208
+ compatibilityVersion = "Xcode 3.2";
209
+ developmentRegion = English;
210
+ hasScannedForEncodings = 0;
211
+ knownRegions = (
212
+ en,
213
+ );
214
+ mainGroup = 3B9FA3ED144AA9CE004D6067;
215
+ productRefGroup = 3B9FA3F9144AA9CE004D6067 /* Products */;
216
+ projectDirPath = "";
217
+ projectRoot = "";
218
+ targets = (
219
+ 3B9FA3F7144AA9CE004D6067 /* stripe-ios */,
220
+ 3B9FA416144AACAF004D6067 /* stripe-example */,
221
+ );
222
+ };
223
+ /* End PBXProject section */
224
+
225
+ /* Begin PBXResourcesBuildPhase section */
226
+ 3B9FA415144AACAF004D6067 /* Resources */ = {
227
+ isa = PBXResourcesBuildPhase;
228
+ buildActionMask = 2147483647;
229
+ files = (
230
+ 3B9FA454144AC62B004D6067 /* STCardViewController.xib in Resources */,
231
+ );
232
+ runOnlyForDeploymentPostprocessing = 0;
233
+ };
234
+ /* End PBXResourcesBuildPhase section */
235
+
236
+ /* Begin PBXSourcesBuildPhase section */
237
+ 3B9FA3F4144AA9CE004D6067 /* Sources */ = {
238
+ isa = PBXSourcesBuildPhase;
239
+ buildActionMask = 2147483647;
240
+ files = (
241
+ 3B9FA40F144AAA5F004D6067 /* Stripe.m in Sources */,
242
+ );
243
+ runOnlyForDeploymentPostprocessing = 0;
244
+ };
245
+ 3B9FA413144AACAF004D6067 /* Sources */ = {
246
+ isa = PBXSourcesBuildPhase;
247
+ buildActionMask = 2147483647;
248
+ files = (
249
+ 3B9FA435144AAD01004D6067 /* main.m in Sources */,
250
+ 3B9FA437144AAD01004D6067 /* STAppDelegate.m in Sources */,
251
+ 3B9FA442144AAE13004D6067 /* STRootViewController.m in Sources */,
252
+ 3B9FA453144AC62B004D6067 /* STCardViewController.m in Sources */,
253
+ );
254
+ runOnlyForDeploymentPostprocessing = 0;
255
+ };
256
+ /* End PBXSourcesBuildPhase section */
257
+
258
+ /* Begin PBXTargetDependency section */
259
+ 3B9FA43A144AAD73004D6067 /* PBXTargetDependency */ = {
260
+ isa = PBXTargetDependency;
261
+ target = 3B9FA3F7144AA9CE004D6067 /* stripe-ios */;
262
+ targetProxy = 3B9FA439144AAD73004D6067 /* PBXContainerItemProxy */;
263
+ };
264
+ /* End PBXTargetDependency section */
265
+
266
+ /* Begin XCBuildConfiguration section */
267
+ 3B9FA403144AA9CE004D6067 /* Debug */ = {
268
+ isa = XCBuildConfiguration;
269
+ buildSettings = {
270
+ ALWAYS_SEARCH_USER_PATHS = NO;
271
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
272
+ CLANG_ENABLE_OBJC_ARC = YES;
273
+ COPY_PHASE_STRIP = NO;
274
+ GCC_C_LANGUAGE_STANDARD = gnu99;
275
+ GCC_DYNAMIC_NO_PIC = NO;
276
+ GCC_OPTIMIZATION_LEVEL = 0;
277
+ GCC_PREPROCESSOR_DEFINITIONS = (
278
+ "DEBUG=1",
279
+ "$(inherited)",
280
+ );
281
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
282
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
283
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
284
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
285
+ GCC_WARN_UNUSED_VARIABLE = YES;
286
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
287
+ SDKROOT = iphoneos;
288
+ };
289
+ name = Debug;
290
+ };
291
+ 3B9FA404144AA9CE004D6067 /* Release */ = {
292
+ isa = XCBuildConfiguration;
293
+ buildSettings = {
294
+ ALWAYS_SEARCH_USER_PATHS = NO;
295
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
296
+ CLANG_ENABLE_OBJC_ARC = YES;
297
+ COPY_PHASE_STRIP = YES;
298
+ GCC_C_LANGUAGE_STANDARD = gnu99;
299
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
300
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
301
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
302
+ GCC_WARN_UNUSED_VARIABLE = YES;
303
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
304
+ SDKROOT = iphoneos;
305
+ VALIDATE_PRODUCT = YES;
306
+ };
307
+ name = Release;
308
+ };
309
+ 3B9FA406144AA9CE004D6067 /* Debug */ = {
310
+ isa = XCBuildConfiguration;
311
+ buildSettings = {
312
+ DSTROOT = /tmp/stripe_ios.dst;
313
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
314
+ GCC_PREFIX_HEADER = src/base/prefix.pch;
315
+ OTHER_LDFLAGS = "-ObjC";
316
+ PRODUCT_NAME = "$(TARGET_NAME)";
317
+ SKIP_INSTALL = YES;
318
+ };
319
+ name = Debug;
320
+ };
321
+ 3B9FA407144AA9CE004D6067 /* Release */ = {
322
+ isa = XCBuildConfiguration;
323
+ buildSettings = {
324
+ DSTROOT = /tmp/stripe_ios.dst;
325
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
326
+ GCC_PREFIX_HEADER = src/base/prefix.pch;
327
+ OTHER_LDFLAGS = "-ObjC";
328
+ PRODUCT_NAME = "$(TARGET_NAME)";
329
+ SKIP_INSTALL = YES;
330
+ };
331
+ name = Release;
332
+ };
333
+ 3B9FA42A144AACAF004D6067 /* Debug */ = {
334
+ isa = XCBuildConfiguration;
335
+ buildSettings = {
336
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
337
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
338
+ GCC_PREFIX_HEADER = "stripe-example/base/prefix.pch";
339
+ INFOPLIST_FILE = "stripe-example/Info.plist";
340
+ PRODUCT_NAME = "$(TARGET_NAME)";
341
+ TARGETED_DEVICE_FAMILY = "1,2";
342
+ WRAPPER_EXTENSION = app;
343
+ };
344
+ name = Debug;
345
+ };
346
+ 3B9FA42B144AACAF004D6067 /* Release */ = {
347
+ isa = XCBuildConfiguration;
348
+ buildSettings = {
349
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
350
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
351
+ GCC_PREFIX_HEADER = "stripe-example/base/prefix.pch";
352
+ INFOPLIST_FILE = "stripe-example/Info.plist";
353
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
354
+ PRODUCT_NAME = "$(TARGET_NAME)";
355
+ TARGETED_DEVICE_FAMILY = "1,2";
356
+ WRAPPER_EXTENSION = app;
357
+ };
358
+ name = Release;
359
+ };
360
+ /* End XCBuildConfiguration section */
361
+
362
+ /* Begin XCConfigurationList section */
363
+ 3B9FA3F2144AA9CE004D6067 /* Build configuration list for PBXProject "stripe-ios" */ = {
364
+ isa = XCConfigurationList;
365
+ buildConfigurations = (
366
+ 3B9FA403144AA9CE004D6067 /* Debug */,
367
+ 3B9FA404144AA9CE004D6067 /* Release */,
368
+ );
369
+ defaultConfigurationIsVisible = 0;
370
+ defaultConfigurationName = Release;
371
+ };
372
+ 3B9FA405144AA9CE004D6067 /* Build configuration list for PBXNativeTarget "stripe-ios" */ = {
373
+ isa = XCConfigurationList;
374
+ buildConfigurations = (
375
+ 3B9FA406144AA9CE004D6067 /* Debug */,
376
+ 3B9FA407144AA9CE004D6067 /* Release */,
377
+ );
378
+ defaultConfigurationIsVisible = 0;
379
+ defaultConfigurationName = Release;
380
+ };
381
+ 3B9FA42C144AACAF004D6067 /* Build configuration list for PBXNativeTarget "stripe-example" */ = {
382
+ isa = XCConfigurationList;
383
+ buildConfigurations = (
384
+ 3B9FA42A144AACAF004D6067 /* Debug */,
385
+ 3B9FA42B144AACAF004D6067 /* Release */,
386
+ );
387
+ defaultConfigurationIsVisible = 0;
388
+ defaultConfigurationName = Release;
389
+ };
390
+ /* End XCConfigurationList section */
391
+ };
392
+ rootObject = 3B9FA3EF144AA9CE004D6067 /* Project object */;
393
+ }
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motion_stripe
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Scott Ballantyne
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-08 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: stripe-ios wrapper for rubymotion
15
+ email:
16
+ - ussballantyne@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - .gitmodules
23
+ - Gemfile
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - lib/motion_stripe.rb
28
+ - lib/motion_stripe/stripe.rb
29
+ - lib/motion_stripe/version.rb
30
+ - motion_stripe.gemspec
31
+ - vendor/stripe-ios/.gitignore
32
+ - vendor/stripe-ios/README
33
+ - vendor/stripe-ios/src/Stripe.h
34
+ - vendor/stripe-ios/src/Stripe.m
35
+ - vendor/stripe-ios/src/base/prefix.pch
36
+ - vendor/stripe-ios/stripe-ios.xcodeproj/project.pbxproj
37
+ homepage: ''
38
+ licenses: []
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ segments:
50
+ - 0
51
+ hash: -618635850112838399
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ segments:
59
+ - 0
60
+ hash: -618635850112838399
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 1.8.24
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: stripe-ios wrapper for rubymotion
67
+ test_files: []