Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
1b1299df
Commit
1b1299df
authored
May 31, 2016
by
Gabriel O'Flaherty-Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consolidate checkout conveniences
parent
d3a0111d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
98 deletions
+25
-98
project.pbxproj
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
+0
-15
Buy.h
Mobile Buy SDK/Mobile Buy SDK/Buy.h
+0
-1
BUYClient+Checkout.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
+10
-0
BUYClient+Checkout.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
+10
-0
BUYApplePayPaymentProvider.m
...le Buy SDK/Payment Providers/BUYApplePayPaymentProvider.m
+3
-2
BUYClient+CheckoutHelpers.h
...ile Buy SDK/Payment Providers/BUYClient+CheckoutHelpers.h
+0
-37
BUYClient+CheckoutHelpers.m
...ile Buy SDK/Payment Providers/BUYClient+CheckoutHelpers.m
+0
-40
BUYWebCheckoutPaymentProvider.m
...Buy SDK/Payment Providers/BUYWebCheckoutPaymentProvider.m
+2
-2
Buy.h
Mobile Buy SDK/Mobile Buy SDK/Static Framework/Buy.h
+0
-1
No files found.
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
View file @
1b1299df
...
@@ -157,10 +157,6 @@
...
@@ -157,10 +157,6 @@
84B0A73B1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72E1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84B0A73B1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72E1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84B0A73C1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
;
};
84B0A73C1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
;
};
84B0A73D1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
;
};
84B0A73D1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
;
};
84B0A7401CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A73E1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84B0A7411CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A73E1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84B0A7421CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A73F1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m */
;
};
84B0A7431CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B0A73F1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m */
;
};
84CD7C2D1CC65D5A00B6EE61
/* _BUYCheckoutAttribute.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84CD7C2D1CC65D5A00B6EE61
/* _BUYCheckoutAttribute.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84CD7C2E1CC65D5A00B6EE61
/* _BUYCheckoutAttribute.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84CD7C2E1CC65D5A00B6EE61
/* _BUYCheckoutAttribute.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84CD7C2F1CC65D7B00B6EE61
/* _BUYCheckoutAttribute.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2C1CC65D5500B6EE61
/* _BUYCheckoutAttribute.m */
;
};
84CD7C2F1CC65D7B00B6EE61
/* _BUYCheckoutAttribute.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CD7C2C1CC65D5500B6EE61
/* _BUYCheckoutAttribute.m */
;
};
...
@@ -556,8 +552,6 @@
...
@@ -556,8 +552,6 @@
84B0A72D1CE10ED900253EB0
/* BUYPaymentProvider.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYPaymentProvider.h
;
sourceTree
=
"<group>"
;
};
84B0A72D1CE10ED900253EB0
/* BUYPaymentProvider.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYPaymentProvider.h
;
sourceTree
=
"<group>"
;
};
84B0A72E1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYWebCheckoutPaymentProvider.h
;
sourceTree
=
"<group>"
;
};
84B0A72E1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYWebCheckoutPaymentProvider.h
;
sourceTree
=
"<group>"
;
};
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYWebCheckoutPaymentProvider.m
;
sourceTree
=
"<group>"
;
};
84B0A72F1CE10ED900253EB0
/* BUYWebCheckoutPaymentProvider.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYWebCheckoutPaymentProvider.m
;
sourceTree
=
"<group>"
;
};
84B0A73E1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"BUYClient+CheckoutHelpers.h"
;
sourceTree
=
"<group>"
;
};
84B0A73F1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+CheckoutHelpers.m"
;
sourceTree
=
"<group>"
;
};
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
_BUYCheckoutAttribute.h
;
sourceTree
=
"<group>"
;
};
84CD7C2B1CC65D5500B6EE61
/* _BUYCheckoutAttribute.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
_BUYCheckoutAttribute.h
;
sourceTree
=
"<group>"
;
};
84CD7C2C1CC65D5500B6EE61
/* _BUYCheckoutAttribute.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
_BUYCheckoutAttribute.m
;
sourceTree
=
"<group>"
;
};
84CD7C2C1CC65D5500B6EE61
/* _BUYCheckoutAttribute.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
_BUYCheckoutAttribute.m
;
sourceTree
=
"<group>"
;
};
84D73BFE1CDD1931000F978A
/* _BUYAddress.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
_BUYAddress.h
;
sourceTree
=
"<group>"
;
};
84D73BFE1CDD1931000F978A
/* _BUYAddress.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
_BUYAddress.h
;
sourceTree
=
"<group>"
;
};
...
@@ -924,8 +918,6 @@
...
@@ -924,8 +918,6 @@
84B0A7281CE10ED900253EB0
/* Payment Providers */
=
{
84B0A7281CE10ED900253EB0
/* Payment Providers */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
84B0A73E1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h */
,
84B0A73F1CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m */
,
84B0A7291CE10ED900253EB0
/* BUYApplePayPaymentProvider.h */
,
84B0A7291CE10ED900253EB0
/* BUYApplePayPaymentProvider.h */
,
84B0A72A1CE10ED900253EB0
/* BUYApplePayPaymentProvider.m */
,
84B0A72A1CE10ED900253EB0
/* BUYApplePayPaymentProvider.m */
,
84B0A72B1CE10ED900253EB0
/* BUYPaymentController.h */
,
84B0A72B1CE10ED900253EB0
/* BUYPaymentController.h */
,
...
@@ -1238,7 +1230,6 @@
...
@@ -1238,7 +1230,6 @@
9A0B0C731CEB52B90037D68F
/* BUYClient+Checkout.h in Headers */
,
9A0B0C731CEB52B90037D68F
/* BUYClient+Checkout.h in Headers */
,
84DD12A11CC63FE600A2442D
/* _BUYImageLink.h in Headers */
,
84DD12A11CC63FE600A2442D
/* _BUYImageLink.h in Headers */
,
84DD12A51CC63FE600A2442D
/* _BUYOption.h in Headers */
,
84DD12A51CC63FE600A2442D
/* _BUYOption.h in Headers */
,
84B0A7411CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h in Headers */
,
84D73C041CDD1945000F978A
/* _BUYAddress.h in Headers */
,
84D73C041CDD1945000F978A
/* _BUYAddress.h in Headers */
,
84DD12C31CC63FEE00A2442D
/* _BUYDiscount.h in Headers */
,
84DD12C31CC63FEE00A2442D
/* _BUYDiscount.h in Headers */
,
84DD12A71CC63FE600A2442D
/* _BUYOptionValue.h in Headers */
,
84DD12A71CC63FE600A2442D
/* _BUYOptionValue.h in Headers */
,
...
@@ -1271,9 +1262,6 @@
...
@@ -1271,9 +1262,6 @@
9A807E841CF74EBE00023160
/* BUYClient+Address.h in Headers */
,
9A807E841CF74EBE00023160
/* BUYClient+Address.h in Headers */
,
84980F531CB7616900CFAB58
/* BUYDecimalNumberTransformer.h in Headers */
,
84980F531CB7616900CFAB58
/* BUYDecimalNumberTransformer.h in Headers */
,
901931421BC5B9BC00D1134E
/* BUYMaskedCreditCard.h in Headers */
,
901931421BC5B9BC00D1134E
/* BUYMaskedCreditCard.h in Headers */
,
8498DCB61CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
8498DCB61CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
8498DCB61CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
841ADE201CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
841ADE201CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
841ADE241CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
841ADE241CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
B2653EC41CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
,
B2653EC41CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
,
...
@@ -1341,7 +1329,6 @@
...
@@ -1341,7 +1329,6 @@
9A0B0C721CEB52B90037D68F
/* BUYClient+Checkout.h in Headers */
,
9A0B0C721CEB52B90037D68F
/* BUYClient+Checkout.h in Headers */
,
84DD12811CC63FE600A2442D
/* _BUYCart.h in Headers */
,
84DD12811CC63FE600A2442D
/* _BUYCart.h in Headers */
,
84DD12851CC63FE600A2442D
/* _BUYCollection.h in Headers */
,
84DD12851CC63FE600A2442D
/* _BUYCollection.h in Headers */
,
84B0A7401CE10F8100253EB0
/* BUYClient+CheckoutHelpers.h in Headers */
,
84D73C021CDD1944000F978A
/* _BUYAddress.h in Headers */
,
84D73C021CDD1944000F978A
/* _BUYAddress.h in Headers */
,
84DD12891CC63FE600A2442D
/* _BUYImageLink.h in Headers */
,
84DD12891CC63FE600A2442D
/* _BUYImageLink.h in Headers */
,
84DD128D1CC63FE600A2442D
/* _BUYOption.h in Headers */
,
84DD128D1CC63FE600A2442D
/* _BUYOption.h in Headers */
,
...
@@ -1691,7 +1678,6 @@
...
@@ -1691,7 +1678,6 @@
9A807E861CF74EBE00023160
/* BUYClient+Address.m in Sources */
,
9A807E861CF74EBE00023160
/* BUYClient+Address.m in Sources */
,
901931161BC5B9BC00D1134E
/* BUYShippingRate.m in Sources */
,
901931161BC5B9BC00D1134E
/* BUYShippingRate.m in Sources */
,
841ADE061CB6C942000004B0
/* NSDate+BUYAdditions.m in Sources */
,
841ADE061CB6C942000004B0
/* NSDate+BUYAdditions.m in Sources */
,
84B0A7431CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m in Sources */
,
84B0A7371CE10ED900253EB0
/* BUYPaymentController.m in Sources */
,
84B0A7371CE10ED900253EB0
/* BUYPaymentController.m in Sources */
,
9019311C1BC5B9BC00D1134E
/* BUYOption.m in Sources */
,
9019311C1BC5B9BC00D1134E
/* BUYOption.m in Sources */
,
84D73C081CDD194D000F978A
/* _BUYAddress.m in Sources */
,
84D73C081CDD194D000F978A
/* _BUYAddress.m in Sources */
,
...
@@ -1834,7 +1820,6 @@
...
@@ -1834,7 +1820,6 @@
9A807E851CF74EBE00023160
/* BUYClient+Address.m in Sources */
,
9A807E851CF74EBE00023160
/* BUYClient+Address.m in Sources */
,
BE9A644E1B503CA60033E558
/* BUYShippingRate.m in Sources */
,
BE9A644E1B503CA60033E558
/* BUYShippingRate.m in Sources */
,
841ADE051CB6C942000004B0
/* NSDate+BUYAdditions.m in Sources */
,
841ADE051CB6C942000004B0
/* NSDate+BUYAdditions.m in Sources */
,
84B0A7421CE10F8100253EB0
/* BUYClient+CheckoutHelpers.m in Sources */
,
84B0A7361CE10ED900253EB0
/* BUYPaymentController.m in Sources */
,
84B0A7361CE10ED900253EB0
/* BUYPaymentController.m in Sources */
,
BE9A64601B503CEC0033E558
/* BUYOption.m in Sources */
,
BE9A64601B503CEC0033E558
/* BUYOption.m in Sources */
,
84D73C061CDD194D000F978A
/* _BUYAddress.m in Sources */
,
84D73C061CDD194D000F978A
/* _BUYAddress.m in Sources */
,
...
...
Mobile Buy SDK/Mobile Buy SDK/Buy.h
View file @
1b1299df
...
@@ -66,7 +66,6 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
...
@@ -66,7 +66,6 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
#import <Buy/BUYClient+Address.h>
#import <Buy/BUYClient+Address.h>
#import <Buy/BUYClient+Customers.h>
#import <Buy/BUYClient+Customers.h>
#import <Buy/BUYClient+Checkout.h>
#import <Buy/BUYClient+Checkout.h>
#import <Buy/BUYClient+CheckoutHelpers.h>
#import <Buy/BUYClient+Storefront.h>
#import <Buy/BUYClient+Storefront.h>
#import <Buy/BUYRequestOperation.h>
#import <Buy/BUYRequestOperation.h>
#import <Buy/BUYError.h>
#import <Buy/BUYError.h>
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
View file @
1b1299df
...
@@ -71,6 +71,16 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -71,6 +71,16 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
@interface
BUYClient
(
Checkout
)
@interface
BUYClient
(
Checkout
)
/**
/**
* Updates or create a checkout based on wether or not it has a token
*
* @param checkout BUYCheckout to create or update
* @param completion (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error)
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
updateOrCreateCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
completion
;
/**
* Builds a checkout on Shopify. The checkout object is used to prepare an order
* Builds a checkout on Shopify. The checkout object is used to prepare an order
*
*
* @param checkout BUYCheckout to create on Shopify
* @param checkout BUYCheckout to create on Shopify
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
View file @
1b1299df
...
@@ -64,6 +64,16 @@
...
@@ -64,6 +64,16 @@
}
}
}
}
-
(
BUYRequestOperation
*
)
updateOrCreateCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
completion
{
if
([
checkout
hasToken
])
{
return
[
self
updateCheckout
:
checkout
completion
:
completion
];
}
else
{
return
[
self
createCheckout
:
checkout
completion
:
completion
];
}
}
-
(
BUYRequestOperation
*
)
createCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
-
(
BUYRequestOperation
*
)
createCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
{
{
BUYAssert
(
checkout
,
@"Failed to create checkout. Invalid checkout object."
);
BUYAssert
(
checkout
,
@"Failed to create checkout. Invalid checkout object."
);
...
...
Mobile Buy SDK/Mobile Buy SDK/Payment Providers/BUYApplePayPaymentProvider.m
View file @
1b1299df
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
#import "BUYApplePayAuthorizationDelegate.h"
#import "BUYApplePayAuthorizationDelegate.h"
#import "BUYApplePayAdditions.h"
#import "BUYApplePayAdditions.h"
#import "BUYShop.h"
#import "BUYShop.h"
#import "BUYClient+CheckoutHelpers.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+Storefront.h"
NSString
*
const
BUYApplePayPaymentProviderId
=
@"BUYApplePayPaymentProviderId"
;
NSString
*
const
BUYApplePayPaymentProviderId
=
@"BUYApplePayPaymentProviderId"
;
...
@@ -113,7 +114,7 @@ NSString *const BUYApplePayPaymentProviderId = @"BUYApplePayPaymentProviderId";
...
@@ -113,7 +114,7 @@ NSString *const BUYApplePayPaymentProviderId = @"BUYApplePayPaymentProviderId";
}];
}];
dispatch_group_enter
(
group
);
dispatch_group_enter
(
group
);
[
self
.
client
handl
eCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
updateOrCreat
eCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
if
(
error
)
{
if
(
error
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
paymentProvider
:
didFailWithError
:
)])
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
paymentProvider
:
didFailWithError
:
)])
{
[
self
.
delegate
paymentProvider
:
self
didFailWithError
:
error
];
[
self
.
delegate
paymentProvider
:
self
didFailWithError
:
error
];
...
...
Mobile Buy SDK/Mobile Buy SDK/Payment Providers/BUYClient+CheckoutHelpers.h
deleted
100644 → 0
View file @
d3a0111d
//
// BUYClient+CheckoutHelpers.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <Buy/Buy.h>
NS_ASSUME_NONNULL_BEGIN
@interface
BUYClient
(
CheckoutHelpers
)
-
(
NSURLSessionDataTask
*
)
handleCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
completion
;
@end
NS_ASSUME_NONNULL_END
Mobile Buy SDK/Mobile Buy SDK/Payment Providers/BUYClient+CheckoutHelpers.m
deleted
100644 → 0
View file @
d3a0111d
//
// BUYClient+CheckoutHelpers.m
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import "BUYClient+CheckoutHelpers.h"
@implementation
BUYClient
(
CheckoutHelpers
)
-
(
BUYRequestOperation
*
)
handleCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
completion
{
if
([
checkout
hasToken
])
{
return
[
self
updateCheckout
:
checkout
completion
:
completion
];
}
else
{
return
[
self
createCheckout
:
checkout
completion
:
completion
];
}
}
@end
Mobile Buy SDK/Mobile Buy SDK/Payment Providers/BUYWebCheckoutPaymentProvider.m
View file @
1b1299df
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#import "BUYWebCheckoutPaymentProvider.h"
#import "BUYWebCheckoutPaymentProvider.h"
#import "BUYCheckout.h"
#import "BUYCheckout.h"
#import "BUYClient+Checkout
Helpers
.h"
#import "BUYClient+Checkout.h"
#import "BUYAssert.h"
#import "BUYAssert.h"
@import
SafariServices
;
@import
SafariServices
;
...
@@ -114,7 +114,7 @@ static NSString *const WebCheckoutCustomerAccessToken = @"customer_access_token"
...
@@ -114,7 +114,7 @@ static NSString *const WebCheckoutCustomerAccessToken = @"customer_access_token"
self
.
checkout
=
checkout
;
self
.
checkout
=
checkout
;
[
self
.
client
handl
eCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
updateOrCreat
eCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
postCheckoutCompletion
:
checkout
error
:
error
];
[
self
postCheckoutCompletion
:
checkout
error
:
error
];
}];
}];
}
}
...
...
Mobile Buy SDK/Mobile Buy SDK/Static Framework/Buy.h
View file @
1b1299df
...
@@ -62,7 +62,6 @@
...
@@ -62,7 +62,6 @@
#import "BUYClient+Address.h"
#import "BUYClient+Address.h"
#import "BUYClient+Customers.h"
#import "BUYClient+Customers.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+CheckoutHelpers.h"
#import "BUYClient+Storefront.h"
#import "BUYClient+Storefront.h"
#import "BUYRequestOperation.h"
#import "BUYRequestOperation.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment