Skip to content

Commit 50045e2

Browse files
authored
updating sample with latest sdk (#236)
1 parent e0e06b1 commit 50045e2

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

samples/kotlin/umaaas-quickstart/backend/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dependencies {
7070
implementation("io.ktor:ktor-client-cio:3.1.3")
7171

7272
// UMAaaS Kotlin client dependencies
73-
implementation("com.lightspark.umaaas:umaaas-kotlin:0.1.0-beta.9")
73+
implementation("com.lightspark.umaaas:umaaas-kotlin:0.1.0-beta.14")
7474

7575
// JSON helper
7676
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1")

samples/kotlin/umaaas-quickstart/backend/src/main/kotlin/routes/Payments.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ fun Route.paymentsRoutes() {
8282
value.isTextual -> JsonValue.from(value.asText())
8383
value.isNumber -> JsonValue.from(value.asText())
8484
value.isBoolean -> JsonValue.from(value.asBoolean().toString())
85+
value.isObject -> JsonValue.from(value)
8586
else -> throw IllegalArgumentException("Unsupported JSON value type for key: $key")
8687
}
8788
putAdditionalProperty(key, jsonValue)

samples/kotlin/umaaas-quickstart/frontend/src/components/forms/PaymentInitiation.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ export default function PaymentInitiation({ currUser, lookupResponse, onQuoteSuc
9696
newSenderUserInfo.EMAIL = currUser.email; // Assign to uppercase EMAIL for request
9797
} else if (field.name === 'FULL_NAME' && currUser.fullName) {
9898
newSenderUserInfo.FULL_NAME = currUser.fullName;
99+
} else if (field.name === 'ACCOUNT_IDENTIFIER' && currUser.platformUserId) {
100+
newSenderUserInfo.ACCOUNT_IDENTIFIER = currUser.platformUserId
101+
} else if (field.name === 'POSTAL_ADDRESS' && currUser.address) {
102+
newSenderUserInfo.POSTAL_ADDRESS = currUser.address;
103+
} else if (field.name === 'BIRTH_DATE' && currUser.birthDate) {
104+
newSenderUserInfo.BIRTH_DATE = currUser.birthDate;
105+
} else if (field.name === 'NATIONALITY' && currUser.nationality) {
106+
newSenderUserInfo.NATIONALITY = currUser.nationality;
99107
}
100108
// Add other fields here if necessary
101109
});
@@ -192,4 +200,4 @@ export default function PaymentInitiation({ currUser, lookupResponse, onQuoteSuc
192200
</div>
193201
</div>
194202
);
195-
}
203+
}

0 commit comments

Comments
 (0)