Skip to content

Implementing IPaymentDetails #118

@SantoshKSah

Description

@SantoshKSah

It should support creating Child class implementing IPaymentDetails.

On creating ApplePayPaymentDetails
ApplePayPaymentDetails implements IPaymentDetails

There is an exception com.google.gson.JsonParseException: cannot serialize ; did you forget to register a subtype
Looks like its coming from JSONFormater.

public static RuntimeTypeAdapterFactory paymentDetailsSerializer() {
return RuntimeTypeAdapterFactory
.of(IPaymentDetails.class, "method")
.registerSubtype(PaypalPaymentDetails.class, "paypal")
.registerSubtype(CreditCardPaymentDetails.class, "credit_card")
.registerSubtype(BankWirePaymentDetails.class, "bank_wire");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions