Insert payment pojo in mongodb

gmgallo
Contributor
Contributor

Hi all

 

I've got a problem in java when trying to insert a retrieved payment into mongodb. I'm using com.paypal.api.payments.Payment class (offered by maven dependency) to obtain from PayPal the correct payment by id and I'm storing it as a pojo into a collection through the codecregistry. But mongo driver throws this error:

org.bson.codecs.configuration.CodecConfigurationException: Could not create a PojoCodec for 'Payment'. Property 'paypalPayment' errored with: Can't find a codec for class com.paypal.api.payments.Payment.

Is there a simple way to store this object into mongodb?

 

Thanks

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.