Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix]opi dto parsing issue 2 #33

Merged
merged 8 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions payment-engine/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
-keep public class org.simpleframework.**{ *; }
-keep class org.simpleframework.xml.**{ *; }
-keep class org.simpleframework.xml.core.**{ *; }
-keep class org.simpleframework.xml.util.**{ *; }
-keep class org.simpleframework.** { *; }
32 changes: 1 addition & 31 deletions payment-engine/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,7 @@
-keep class de.tillhub.paymentengine.data.TransactionResultCode { *; }
-keep class de.tillhub.paymentengine.data.TransactionResultCode$* { *; }

# Communication classes
-keep class de.tillhub.paymentengine.opi.data.CardServiceRequest { *; }
-keep class de.tillhub.paymentengine.opi.data.PosData { *; }
-keep class de.tillhub.paymentengine.opi.data.TotalAmount { *; }
-keep class de.tillhub.paymentengine.opi.data.OriginalTransaction { *; }
-keep class de.tillhub.paymentengine.opi.data.ServiceRequestType { *; }
-keep class de.tillhub.paymentengine.opi.data.CardServiceResponse { *; }
-keep class de.tillhub.paymentengine.opi.data.Terminal { *; }
-keep class de.tillhub.paymentengine.opi.data.Tender { *; }
-keep class de.tillhub.paymentengine.opi.data.CardDetails { *; }
-keep class de.tillhub.paymentengine.opi.data.CardValue { *; }
-keep class de.tillhub.paymentengine.opi.data.PrivateData { *; }
-keep class de.tillhub.paymentengine.opi.data.Authorisation { *; }
-keep class de.tillhub.paymentengine.opi.data.ValueElement { *; }
-keep class de.tillhub.paymentengine.opi.data.OverallResult { *; }
-keep class de.tillhub.paymentengine.opi.data.DeviceRequest { *; }
-keep class de.tillhub.paymentengine.opi.data.Output { *; }
-keep class de.tillhub.paymentengine.opi.data.TextLine { *; }
-keep class de.tillhub.paymentengine.opi.data.DeviceType { *; }
-keep class de.tillhub.paymentengine.opi.data.DeviceRequestType { *; }
-keep class de.tillhub.paymentengine.opi.data.DeviceResponse { *; }
-keep class de.tillhub.paymentengine.opi.data.ServiceRequest { *; }
-keep class de.tillhub.paymentengine.opi.data.ServiceResponse { *; }
-keep class de.tillhub.paymentengine.opi.data.Reconciliation { *; }

-keep public class org.simpleframework.**{ *; }
-keep class org.simpleframework.xml.**{ *; }
-keep class org.simpleframework.xml.core.**{ *; }
-keep class org.simpleframework.xml.util.**{ *; }
-keepattributes *Annotation*
-keepattributes Signature
-keep class org.simpleframework.** { *; }

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.tillhub.paymentengine.opi.data

import android.os.Parcelable
import androidx.annotation.Keep
import kotlinx.parcelize.Parcelize
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.Element
Expand All @@ -10,6 +11,7 @@ import org.simpleframework.xml.Root
import org.simpleframework.xml.Text
import java.math.BigDecimal

@Keep
@Root(name = "CardServiceRequest", strict = false)
@NamespaceList(
Namespace(reference = "http://www.nrf-arts.org/IXRetail/namespace"),
Expand Down Expand Up @@ -45,13 +47,15 @@ internal data class CardServiceRequest(
var originalTransaction: OriginalTransaction? = null,
)

@Keep
@Root(name = "POSdata", strict = false)
internal data class PosData(
@field:Element(name = "POSTimeStamp")
@param:Element(name = "POSTimeStamp")
var timestamp: String = ""
)

@Keep
@Parcelize
@Root(name = "TotalAmount", strict = false)
internal data class TotalAmount(
Expand All @@ -76,6 +80,7 @@ internal data class TotalAmount(
var paymentAmount: String? = null,
) : Parcelable

@Keep
internal data class OriginalTransaction(
@field:Attribute(name = "STAN")
@param:Attribute(name = "STAN")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.tillhub.paymentengine.opi.data

import android.os.Parcelable
import androidx.annotation.Keep
import kotlinx.parcelize.Parcelize
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.Element
Expand All @@ -9,6 +10,7 @@ import org.simpleframework.xml.NamespaceList
import org.simpleframework.xml.Root
import org.simpleframework.xml.Text

@Keep
@Parcelize
@Root(name = "CardServiceResponse", strict = false)
@NamespaceList(
Expand Down Expand Up @@ -50,6 +52,7 @@ internal data class CardServiceResponse(
var privateData: PrivateData? = null,
) : Parcelable, OPIResponse

@Keep
@Parcelize
@Root(name = "Terminal", strict = false)
internal data class Terminal(
Expand All @@ -61,6 +64,7 @@ internal data class Terminal(
var terminalId: String? = null,
) : Parcelable

@Keep
@Parcelize
@Root(name = "Tender", strict = false)
internal data class Tender(
Expand All @@ -73,6 +77,7 @@ internal data class Tender(
var totalAmount: TotalAmount? = null
) : Parcelable

@Keep
@Parcelize
@Root(name = "Authorisation", strict = false)
internal data class Authorisation(
Expand Down Expand Up @@ -108,6 +113,7 @@ internal data class Authorisation(
var authorisationType: String? = null,
) : Parcelable

@Keep
@Parcelize
@Root(name = "CardDetails", strict = false)
internal data class CardDetails(
Expand All @@ -116,6 +122,7 @@ internal data class CardDetails(
var expiryDate: ValueElement = ValueElement()
) : Parcelable

@Keep
@Parcelize
@Root(name = "CardValue", strict = false)
internal data class CardValue(
Expand All @@ -130,6 +137,7 @@ internal data class CardValue(
var cardPAN: ValueElement? = null,
) : Parcelable

@Keep
@Parcelize
@Root(name = "PrivateData", strict = false)
internal data class PrivateData(
Expand All @@ -153,6 +161,7 @@ internal data class PrivateData(
var rebootInfo: ValueElement? = null,
) : Parcelable

@Keep
@Parcelize
internal data class ValueElement(
@field:Text(required = false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package de.tillhub.paymentengine.opi.data

import androidx.annotation.Keep
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.ElementList
import org.simpleframework.xml.Namespace
import org.simpleframework.xml.NamespaceList
import org.simpleframework.xml.Root
import org.simpleframework.xml.Text

@Keep
@Root(name = "DeviceRequest", strict = false)
@NamespaceList(
Namespace(reference = "http://www.nrf-arts.org/IXRetail/namespace"),
Expand All @@ -31,6 +33,7 @@ internal data class DeviceRequest(
var output: List<Output>? = null,
)

@Keep
@Root(name = "Output", strict = false)
internal data class Output(
@field:Attribute(name = "OutDeviceTarget")
Expand All @@ -46,6 +49,7 @@ internal data class Output(
var textLines: List<TextLine>? = null
)

@Keep
@Root(name = "TextLine", strict = false)
internal data class TextLine(
@field:Attribute(name = "TimeOut", required = false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package de.tillhub.paymentengine.opi.data

import androidx.annotation.Keep
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.ElementList
import org.simpleframework.xml.Namespace
import org.simpleframework.xml.NamespaceList
import org.simpleframework.xml.Root

@Keep
@Root(name = "DeviceResponse", strict = false)
@NamespaceList(
Namespace(reference = "http://www.nrf-arts.org/IXRetail/namespace"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package de.tillhub.paymentengine.opi.data

import androidx.annotation.Keep
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.Element
import org.simpleframework.xml.Namespace
import org.simpleframework.xml.NamespaceList
import org.simpleframework.xml.Root

@Keep
@Root(name = "ServiceRequest", strict = false)
@NamespaceList(
Namespace(reference = "http://www.nrf-arts.org/IXRetail/namespace"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.tillhub.paymentengine.opi.data

import android.os.Parcelable
import androidx.annotation.Keep
import kotlinx.parcelize.Parcelize
import org.simpleframework.xml.Attribute
import org.simpleframework.xml.Element
Expand All @@ -9,6 +10,7 @@ import org.simpleframework.xml.Namespace
import org.simpleframework.xml.NamespaceList
import org.simpleframework.xml.Root

@Keep
@Parcelize
@Root(name = "ServiceResponse", strict = false)
@NamespaceList(
Expand Down Expand Up @@ -46,6 +48,7 @@ internal data class ServiceResponse(
var reconciliation: Reconciliation? = null,
) : Parcelable, OPIResponse

@Keep
@Parcelize
@Root(name = "Reconciliation", strict = false)
internal data class Reconciliation(
Expand Down