### Updating Session with Card Details (Java) Source: https://github.com/mastercard-gateway/gateway-android-sdk/blob/master/README.md Use the Gateway object to update an existing session with sensitive card information. The GatewayMap object facilitates building the request payload with nested parameters using dot notation, matching the structure defined in the online integration guide. ```Java // The GatewayMap object provides support for building a nested map structure using key-based dot(.) notation. // Each parameter is similarly defined in your online integration guide. GatewayMap request = new GatewayMap() .set("sourceOfFunds.provided.card.nameOnCard", nameOnCard) .set("sourceOfFunds.provided.card.number", cardNumber) .set("sourceOfFunds.provided.card.securityCode", cardCvv) .set("sourceOfFunds.provided.card.expiry.month", cardExpiryMM) .set("sourceOfFunds.provided.card.expiry.year", cardExpiryYY); gateway.updateSession(sessionId, apiVersion, request, callback); ``` -------------------------------- ### Apache License 2.0 Boilerplate Template Source: https://github.com/mastercard-gateway/gateway-android-sdk/blob/master/LICENSE.txt This snippet provides the standard boilerplate text for the Apache License, Version 2.0. It is intended to be included at the beginning of source files, enclosed in appropriate comment syntax, with the bracketed fields replaced by specific project information. ```Text Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` -------------------------------- ### Initializing Mastercard Gateway Object (Java) Source: https://github.com/mastercard-gateway/gateway-android-sdk/blob/master/README.md Create a new instance of the Gateway class and configure it with your specific merchant ID and the appropriate gateway region. This step is required before performing any operations with the SDK. ```Java Gateway gateway = new Gateway(); gateway.setMerchantId("YOUR_MERCHANT_ID"); gateway.setRegion(Gateway.Region.YOUR_REGION); ``` -------------------------------- ### Adding Mastercard Gateway Android SDK Dependency (Gradle) Source: https://github.com/mastercard-gateway/gateway-android-sdk/blob/master/README.md Include the Mastercard Gateway Android SDK library as a dependency in your Android project's build.gradle file. Replace 'X.X.X' with the desired version number. This makes the SDK available for use in your application. ```Groovy implementation 'com.mastercard.gateway:gateway-android:X.X.X' ``` -------------------------------- ### Updating Session with Card Details (RxJava) Source: https://github.com/mastercard-gateway/gateway-android-sdk/blob/master/README.md Optionally, use the RxJava2 library to perform the session update operation asynchronously. The updateSession method returns a Single observable that emits the result as a GatewayMap upon completion. ```Java Single single = gateway.updateSession(sessionId, apiVersion, request); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.