diff --git a/README.md b/README.md index accf7e63..d195dba9 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,7 @@ const allConfigurations = { shipping: shipping, allowedCadTypes:AllowedCadTypes.ALL, paymentitems: paymentitems, - paymenMetaData: { a: 'a meta', b: 'b meta' }, + paymentMetadata: { a: 'a meta', b: 'b meta' }, applePayMerchantID: 'applePayMerchantID', authorizeAction: { timeInHours: 10, time: 10, type: 'CAPTURE' }, cardHolderName: 'Card Holder NAME', diff --git a/android/src/main/java/company/tap/goSellSDKExamplee/GoSellSdKDelegate.java b/android/src/main/java/company/tap/goSellSDKExamplee/GoSellSdKDelegate.java index 6c84b540..a28cf0ce 100644 --- a/android/src/main/java/company/tap/goSellSDKExamplee/GoSellSdKDelegate.java +++ b/android/src/main/java/company/tap/goSellSDKExamplee/GoSellSdKDelegate.java @@ -200,7 +200,7 @@ private void configureSDKSession(HashMap sessionParameters, RNGo sdkSession.setPaymentDescription(sessionParameters.get("paymentDescription").toString()); // ** Optional ** // Payment Extra Info - sdkSession.setPaymentMetadata(DeserializationUtil.getMetaData(sessionParameters.get("paymenMetaData")));// **Optional** you can pass empty array hashmap// + sdkSession.setPaymentMetadata(DeserializationUtil.getMetaData(sessionParameters.get("paymentMetadata")));// **Optional** you can pass empty array hashmap// // Payment Reference sdkSession.setPaymentReference(DeserializationUtil.getReference(sessionParameters.get("paymentReference"))); // **Optional**you can pass null diff --git a/ios/Classes/Bridge.swift b/ios/Classes/Bridge.swift index 20b01e4c..0c7b3bd4 100644 --- a/ios/Classes/Bridge.swift +++ b/ios/Classes/Bridge.swift @@ -228,6 +228,13 @@ extension Bridge: SessionDataSource { return paymentReferenceItems } return nil + } + public var paymentMetadata: Metadata? { + if let paymentMetadataString:[String: Any] = argsSessionParameters?["paymentMetadata"] as? [String: Any] { + let paymentMetadataItems:Metadata = try! Metadata.init(dictionary: paymentMetadataString) + return paymentMetadataItems + } + return nil } public var receiptSettings: Receipt? { if let receiptSettingsString:String = argsSessionParameters?["receiptSettings"] as? String {