Skip to content

Commit 78a8c4c

Browse files
update podspec file
1 parent a732427 commit 78a8c4c

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

dojo-ios-sdk.podspec

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'dojo-ios-sdk'
11-
s.version = '0.7.8'
11+
s.version = '1.0.0'
1212
s.summary = 'Dojo Payment SDK'
1313

1414
# This description is used to generate tags and improve search results.
@@ -32,39 +32,39 @@ dojo-ios-sdk is available through [CocoaPods](https://cocoapods.org). To install
3232
it, simply add the following line to your Podfile:
3333
3434
```ruby
35-
pod 'dojo-ios-sdk', :git => '[email protected]:Dojo-Engineering/dojo-ios-sdk.git', :tag => '0.2.0'
35+
pod 'dojo-ios-sdk', :git => '[email protected]:Dojo-Engineering/dojo-ios-sdk.git', :tag => '1.0.0'
3636
```
3737
## How to use
3838
SDK functionality can be accessed via DojoSdk object.
3939
4040
## Swift
4141
4242
### Card payment
43-
```
43+
```swift
4444
import dojo_ios_sdk
4545
46-
let cardPaymentPayload = DojoCardPaymentPayload(cardDetails: DojoCardDetails(cardNumber: "4456530000001096", cardName: "Card Holder Name", expiryDate: "12 / 24", cv2: "020"), isSandbox: true)
46+
let cardPaymentPayload = DojoCardPaymentPayload(cardDetails: DojoCardDetails(cardNumber: "4456530000001096", cardName: "Card Holder Name", expiryDate: "12 / 24", cv2: "020"))
4747
let token = "Token from Payment Intent (connecteToken)"
4848
DojoSDK.executeCardPayment(token: token,
4949
payload: cardPaymentPayload,
5050
fromViewController: self) { [weak self] result in
5151
print(result)
5252
}
5353
```
54-
This example includes only required fields, you can find additional fields that can be passed in the API reference. // TODO URL
54+
This example includes only required fields, you can find additional fields that can be passed in the API reference.
5555
5656
### ApplePay Payment
57-
```
57+
```swift
5858
import dojo_ios_sdk
5959
60-
let applePayConfig = DojoApplePayConfig(merchantIdentifier:"merchant.uk.co.paymentsense.sdk.demo.app")
61-
let applePayPayload = DojoApplePayPayload(applePayConfig: applePayConfig, isSandbox: true)
62-
let paymentIntent = DojoPaymentIntent(connecteToken: "Token from Payment Intent (connecteToken)", totalAmount: DojoPaymentIntentAmount(value: 120, currencyCode: "GBP")) // TODO - this values should be populated from payment intent
60+
let applePayConfig = DojoApplePayConfig(merchantIdentifier:"merchant.uk.co.paymentsense.sdk.demo.app", supportedCards: ["visa","mastercard", "amex", "maestro"])
61+
let applePayPayload = DojoApplePayPayload(applePayConfig: applePayConfig)
62+
let paymentIntent = DojoPaymentIntent(id: "Payment intent ID", totalAmount: DojoPaymentIntentAmount(value: 120, currencyCode: "GBP"))
6363
DojoSDK.executeApplePayPayment(paymentIntent: paymentIntent, payload: applePayPayload, fromViewController: self) { [weak self] result in
6464
print(result)
6565
}
6666
```
67-
This example includes only required fields, you can find additional fields that can be passed in the API reference. // TODO URL
67+
This example includes only required fields, you can find additional fields that can be passed in the API reference.
6868
6969
## Objective-C
7070
@@ -84,8 +84,8 @@ DojoCardPaymentPayload* cardPaymentPayload = [[DojoCardPaymentPayload alloc]
8484
billingAddress: NULL
8585
shippingDetails: NULL
8686
metaData: NULL
87-
isSandbox: YES];
88-
NSString *token = @"Token from Payment Intent (connecteToken)";
87+
savePaymentMethod: FALSE];
88+
NSString *token = @"Token from Payment Intent";
8989
[DojoSDK executeCardPaymentWithToken: token payload: cardPaymentPayload fromViewController: self completion:^(NSInteger result) {
9090
NSLog(@"%ld", (long)result);
9191
}];
@@ -97,17 +97,19 @@ NSString *token = @"Token from Payment Intent (connecteToken)";
9797
#import <dojo_ios_sdk/dojo_ios_sdk-Swift.h>
9898
9999
DojoApplePayConfig *applePayConfig = [[DojoApplePayConfig alloc] initWithMerchantIdentifier: @"merchant.uk.co.paymentsense.sdk.demo.app"
100+
supportedCards: [NSArray arrayWithObjects: @"visa", @"mastercard", nil]
100101
collectBillingAddress: FALSE
101102
collectShippingAddress: FALSE
102-
collectEmail: FALSE];
103-
DojoApplePayPayload *applePayPayload = [[DojoApplePayPayload alloc] initWithApplePayConfig: applePayConfig email: NULL metaData: NULL isSandbox: YES];
104-
DojoPaymentIntent *paymentIntent = [[DojoPaymentIntent alloc] initWithConnecteToken: @"Token from Payment Intent (connecteToken)" totalAmount: [[DojoPaymentIntentAmount alloc] initWithValue: 120 currencyCode:@"GBP"]]; / TODO - this values should be populated from payment intent
103+
collectEmail: FALSE];
104+
DojoApplePayPayload *applePayPayload = [[DojoApplePayPayload alloc] initWithApplePayConfig: applePayConfig userEmailAddress: NULL metaData: NULL];
105+
DojoPaymentIntent *paymentIntent = [[DojoPaymentIntent alloc] initWithId: @"PaymentIntent ID" clientSessionSecret: @"Token from Payment Intent" totalAmount: [[DojoPaymentIntentAmount alloc] initWithValue: 120 currencyCode:@"GBP"]];
106+
105107
[DojoSDK executeApplePayPaymentWithPaymentIntent: paymentIntent payload: applePayPayload fromViewController:self completion: ^(NSInteger result) {
106108
NSLog(@"%ld", (long)result);
107109
}];
108110
```
109111
110-
This example includes only required fields, you can find additional fields that can be passed in the API reference. // TODO URL
112+
This example includes only required fields, you can find additional fields that can be passed in the API reference.
111113
112114
113115
## Result codes
@@ -127,6 +129,10 @@ internalServerError = 500
127129
128130
sdkInternalError = 7770
129131
```
132+
133+
## License
134+
135+
dojo-ios-sdk is available under the MIT license. See the LICENSE file for more info.
130136
DESC
131137

132138
s.homepage = 'https://github.com/dojo-engineering/dojo-ios-sdk'

0 commit comments

Comments
 (0)