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
9f81b554
Commit
9f81b554
authored
8 years ago
by
Gabriel O'Flaherty-Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make shop required for instantiation
parent
be59c98e
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
29 deletions
+5
-29
BUYApplePayHelpers.h
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.h
+4
-10
BUYApplePayHelpers.m
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.m
+1
-19
No files found.
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.h
View file @
9f81b554
...
...
@@ -34,17 +34,9 @@
@class
BUYCheckout
;
@class
BUYShop
;
@interface
BUYApplePayHelpers
:
NSObject
<
PKPaymentAuthorizationViewControllerDelegate
>
NS_ASSUME_NONNULL_BEGIN
/**
* Initializes a helper to support Apple Pay
*
* @param client A configured client
* @param checkout The checkout which is to be completed using Apple Pay
*
* @return helper object
*/
-
(
instancetype
)
initWithClient
:
(
BUYClient
*
)
client
checkout
:
(
BUYCheckout
*
)
checkout
;
@interface
BUYApplePayHelpers
:
NSObject
<
PKPaymentAuthorizationViewControllerDelegate
>
/**
* Initializes a helper to support Apple Pay
...
...
@@ -132,3 +124,5 @@
-
(
BUYAddress
*
)
buyAddressWithContact
:(
PKContact
*
)
contact
NS_AVAILABLE_IOS
(
9
_0
);
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.m
View file @
9f81b554
...
...
@@ -51,11 +51,6 @@ const NSTimeInterval PollDelay = 0.5;
@implementation
BUYApplePayHelpers
-
(
instancetype
)
initWithClient
:(
BUYClient
*
)
client
checkout
:(
BUYCheckout
*
)
checkout
{
return
[
self
initWithClient
:
client
checkout
:
checkout
shop
:
nil
];
}
-
(
instancetype
)
initWithClient
:(
BUYClient
*
)
client
checkout
:(
BUYCheckout
*
)
checkout
shop
:(
BUYShop
*
)
shop
{
NSParameterAssert
(
client
);
...
...
@@ -66,25 +61,12 @@ const NSTimeInterval PollDelay = 0.5;
if
(
self
)
{
self
.
client
=
client
;
self
.
checkout
=
checkout
;
// We need a shop object to display the business name in the pay sheet
if
(
shop
)
{
self
.
shop
=
shop
;
}
else
{
[
self
.
client
getShop
:
^
(
BUYShop
*
shop
,
NSError
*
error
)
{
if
(
shop
)
{
self
.
shop
=
shop
;
}
}];
}
self
.
shop
=
shop
;
}
return
self
;
}
#pragma mark - PKPaymentAuthorizationDelegate methods
-
(
void
)
paymentAuthorizationViewController
:(
PKPaymentAuthorizationViewController
*
)
controller
...
...
This diff is collapsed.
Click to expand it.
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