Skip to content

Commit

Permalink
feat: support additionalFields, this release requires parsek-plugin-a…
Browse files Browse the repository at this point in the history
…uth v2.0.0
  • Loading branch information
duruer committed Jun 6, 2024
1 parent b8b8484 commit 42fc148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
} else {
compileOnly("com.github.StatuParsek:Parsek:main-SNAPSHOT")
compileOnly("com.github.StatuParsek:parsek-plugin-database:main-SNAPSHOT")
compileOnly("com.github.StatuParsek:parsek-plugin-auth:main-SNAPSHOT")
compileOnly("com.github.StatuParsek:parsek-plugin-auth:2.0.0")
compileOnly("com.github.StatuParsek:parsek-plugin-payment:main-SNAPSHOT")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class LemonSqueezyPaymentIntegration(
val zipCode = billDetail.zipCode.ifBlank { "000000" }
val taxNumber = billDetail.taxOrIdNum.ifBlank { "11111111111" }

val userFullName = user.additionalFields.getString("name") + " " + user.additionalFields.getString("surname")

val data = JsonObject(
mapOf(
"data" to mapOf(
Expand All @@ -61,12 +63,12 @@ class LemonSqueezyPaymentIntegration(
"enabled_variants" to listOf(lemonSqueezyConfig.singlePaymentId)
),
"checkout_data" to mapOf(
"name" to user.fullName,
"name" to userFullName,
"email" to user.email,
"tax_number" to taxNumber,
"billing_address" to mapOf(
"country" to "GE",
"zip" to user.fullName,
"zip" to userFullName,
),
"custom" to mapOf(
"purchaseId" to purchaseId,
Expand Down

0 comments on commit 42fc148

Please sign in to comment.