Commit c91e7c7 1 parent aa4c059 commit c91e7c7 Copy full SHA for c91e7c7
File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,17 @@ class INPPaymentService {
45
45
46
46
static func validateByProductName( productName: String ,
47
47
receipt: String ,
48
+ brandingId: Int ? ,
48
49
completion: @escaping RequestCompletion < Empty > ) {
49
- let params : [ String : Any ] = [
50
+ var params : [ String : Any ] = [
50
51
PaymentParameters . receipt: receipt,
51
52
PaymentParameters . productName: productName
52
53
]
54
+
55
+ if let brandingID = brandingId {
56
+ params [ PaymentParameters . brandingID] = brandingID
57
+ }
58
+
53
59
NetworkDataSource . performRequest ( session: InPlayerSessionAPIManager . default. session,
54
60
route: PaymentAPIRouter . validatePaymentByProductName ( parameters: params) ,
55
61
completion: completion)
Original file line number Diff line number Diff line change @@ -40,17 +40,20 @@ public extension InPlayer {
40
40
- Parameters:
41
41
- productName: Purchased product name
42
42
- receipt: Base64EncodedString of the recept data stored on device after successfull in-app purchase.
43
+ - brandingID: Optional parameter - system branding theme ID
43
44
- success: A closure to be executed once the request has finished successfully.
44
45
- failure: A closure to be executed once the request has finished with error.
45
46
- error: Containing information about the error that occurred.
46
47
*/
47
48
48
49
public static func validateByProductName( productName: String ,
49
50
receipt: String ,
51
+ brandingID: Int ? = nil ,
50
52
success: @escaping ( ) -> Void ,
51
53
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
52
54
INPPaymentService . validateByProductName ( productName: productName,
53
55
receipt: receipt,
56
+ brandingId: brandingID,
54
57
completion: { ( _, error) in
55
58
if let error = error {
56
59
failure ( error)
You can’t perform that action at this time.
0 commit comments