Skip to content
New issue

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

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

Already on GitHub? # to your account

Implementing IPaymentDetails #118

Open
SantoshKSah opened this issue Mar 30, 2022 · 0 comments
Open

Implementing IPaymentDetails #118

SantoshKSah opened this issue Mar 30, 2022 · 0 comments

Comments

@SantoshKSah
Copy link

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");
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant