File tree Expand file tree Collapse file tree 38 files changed +127
-108
lines changed
Entities/CardPaymentPayload
Libs/CardinalMobile.xcframework
ios-arm64_x86_64-simulator/CardinalMobile.framework
ios-arm64/CardinalMobile.framework Expand file tree Collapse file tree 38 files changed +127
-108
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ protocol DojoSDKProtocol {
4343
4444/// DojoSDK interface
4545@objc public class DojoSDK : NSObject , DojoSDKProtocol {
46+
47+ public static override func version( ) -> Int {
48+ 141
49+ }
50+
4651 /// Execute card payment
4752 /// - Parameters:
4853 /// - token: Payment secret obtained from a paymentIIntent object.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import Foundation
2828 self . userPhoneNumber = userPhoneNumber
2929 self . billingAddress = billingAddress
3030 self . shippingDetails = shippingDetails
31- self . metaData = metaData
31+ self . metaData = metaData == nil ? [ : ] : metaData
3232 self . savePaymentMethod = savePaymentMethod
3333 }
3434
@@ -43,14 +43,15 @@ import Foundation
4343 /// The address where to send the order.
4444 public let shippingDetails : DojoShippingDetails ?
4545 /// A set of key-value pairs that you can use for storing additional information.
46- public let metaData : [ String : String ] ?
46+ public var metaData : [ String : String ] ?
4747 /// Set if you want to save this payment method on user's account
4848 public let savePaymentMethod : Bool
4949}
5050
5151extension DojoCardPaymentPayload {
5252 func getRequestBody( ) -> Data ? {
5353 let encoder = JSONEncoder ( )
54+ self . metaData ? [ getMetadataSDKVersionKey ( ) ] = getMetadataSDKVersion ( )
5455 guard let bodyData = try ? encoder. encode ( CardPaymentDataRequest ( payload: self ) ) else {
5556 return nil
5657 }
Original file line number Diff line number Diff line change @@ -9,4 +9,16 @@ import Foundation
99
1010protocol DojoCardPaymentPayloadProtocol : Codable {
1111 func getRequestBody( ) -> Data ?
12+ func getMetadataSDKVersion( ) -> String
13+ func getMetadataSDKVersionKey( ) -> String
14+ }
15+
16+ extension DojoCardPaymentPayloadProtocol {
17+ func getMetadataSDKVersion( ) -> String {
18+ " ios- \( DojoSDK . version ( ) ) "
19+ }
20+
21+ func getMetadataSDKVersionKey( ) -> String {
22+ " dojo-sdk-core-version "
23+ }
1224}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import Foundation
2626 self . userPhoneNumber = userPhoneNumber
2727 self . userEmailAddress = userEmailAddress
2828 self . shippingDetails = shippingDetails
29- self . metaData = metaData
29+ self . metaData = metaData == nil ? [ : ] : metaData
3030 }
3131
3232 /// CVV, CVC or CVC2 of a card.
@@ -40,10 +40,11 @@ import Foundation
4040 /// The address where to send the order.
4141 public let shippingDetails : DojoShippingDetails ?
4242 /// A set of key-value pairs that you can use for storing additional information.
43- public let metaData : [ String : String ] ?
43+ public var metaData : [ String : String ] ?
4444
4545 func getRequestBody( ) -> Data ? {
4646 let encoder = JSONEncoder ( )
47+ self . metaData ? [ getMetadataSDKVersionKey ( ) ] = getMetadataSDKVersion ( )
4748 guard let bodyData = try ? encoder. encode ( CardPaymentDataRequest ( payload: self ) ) else {
4849 return nil
4950 }
Original file line number Diff line number Diff line change 55// Copyright © 2018 Cardinal Commerce. All rights reserved.
66//
77
8- #import " Customization.h"
8+ #import < CardinalMobile/ Customization.h>
99
1010/* *
1111 * The ButtonCustomization class provides methods for the 3DS Requestor App to pass button customization parameters to the 3DS SDK.
Original file line number Diff line number Diff line change 66//
77
88#import < Foundation/Foundation.h>
9- #import " Warning.h"
10- #import " DirectoryServerIDConst.h"
9+ #import < CardinalMobile/ Warning.h>
10+ #import < CardinalMobile/ DirectoryServerIDConst.h>
1111
1212NS_ASSUME_NONNULL_BEGIN
1313
Original file line number Diff line number Diff line change 66//
77
88#import < Foundation/Foundation.h>
9- #import " UiCustomization.h"
9+ #import < CardinalMobile/ UiCustomization.h>
1010NS_ASSUME_NONNULL_BEGIN
1111
1212/* !
Original file line number Diff line number Diff line change 66//
77
88#import < Foundation/Foundation.h>
9- #import " ThreeDS2Service.h"
9+ #import < CardinalMobile/ ThreeDS2Service.h>
1010
1111@class ConfigParameters;
1212@class UiCustomization;
You can’t perform that action at this time.
0 commit comments