Page 1 of 1

Paypal module

Posted: Wed Nov 14, 2012 9:14 am
by Bastiien
Hi,

I try paypal module integration with Broadleaf version 2.1.0-SNAPSHOT.

I have 2 kinds of problems :

- I integrated Paypal module 2.1.0-SNAPSHOT first and tried AUTHORIZEANDDEBIT method : I got an error inside "commonAuthorizeOrSale" because the code called a getter of Order (Currency) that does not exist.

- I tried version 2.0.0-GA too and DEBIT method : I have also the error "The TRANSACTIONID value must be defined as an additional field in the PaymentInfo instance passed in."
TRANSACTIONID is null inside AdditionalFields of PaymentInfo and the value you seem looking for is the id of PaymentInfo.
Is it an error or an incompatibility between this 2 versions (broadleaf 2.1.0 et Paypal module 2.0.0) ?

Thx
Bastien

Re: Paypal module

Posted: Wed Nov 14, 2012 11:52 am
by phillipuniverse
You should not be using 2.1.0-SNAPSHOT but instead 2.0.1-GA. 2.1.0-SNAPSHOT is for 2.2 and up.

We are working on documentation for matching up Broadleaf versions to 3rd-party module versions since they are not intended to follow each other.

Re: Paypal module

Posted: Wed Nov 14, 2012 11:53 am
by phillipuniverse
Looking into your second point about the incorrect transactionid. Where in the process does this happen? I assume handling the process back from PayPal?

Re: Paypal module

Posted: Wed Nov 14, 2012 1:10 pm
by denis
Hi Phillip,

In fact, Bastien and me are in the same team (your class in France) and Brian told us that we should use BLC 2.1.0-SNAPSHOT because we want to move to BLC 2.2 when your release will be done.

Re: Paypal module

Posted: Wed Nov 14, 2012 4:46 pm
by phillipuniverse
Yup, I remember you both :)

So if you are using BLC 2.1.0-SNAPSHOT, then the Paypal module should be on 2.0.1-GA. When we first started out creating these third-party modules, we envisioned releasing them in tandem with BLC releases (and thus the version numbers lining up the same) but we have backtracked on that stance and now all 3rd-party modules have their own versioning completely independent of BLC.

Currently, there are no changes needed for Paypal between BLC version 2.0 and 2.1, and thus you should still be using the BLC-2.0-enabled Paypal module (which is 2.0.1-GA). Once you move to BLC 2.2, you will need to change the Paypal version to 2.1.

Hopefully you guys aren't completely confused! Some of this versioning stuff is definitely tricky, even for us. Let me know if any of that is unclear.

Re: Paypal module

Posted: Thu Nov 15, 2012 8:43 am
by Bastiien
We are unforgettable 8-)

To be serious, it works fine with version 2.0.1-GA of PayPal module.
To use AUTHORIZEANDDEBIT payment action type, I had to create my own MyPayPalPaymentServiceImpl to add proxy configuration to communicateWithVendor method. Is it the only way to configure proxy to external http call ?

my error with transactionid null happened with DEBIT payment action type only. I did not search anymore why and I will not use this method.

Bastien

Re: Paypal module

Posted: Thu Nov 15, 2012 11:14 am
by elbertbautista
Hi bastien,

You're on the right track. The methods "initiateExpressCheckout" and "completeExpressCheckout" in PayPalCheckoutServiceImpl is only for an AUTHORIZEANDDEBIT transaction only (the default configured workflow). The PayPalCheckoutService just facilitates the flow of a basic eCommerce checkout (where an authorization and capture are done in a single transaction).

If you are wanting to perform just a DEBIT transaction, maybe in an offline process or as a batch capture at a later point?
In order to perform just a DEBIT transaction (which is just a CAPTURE), you will need to manually construct the Payment Info and place the TRANSACTIONID on the additional fields map. Also note, TRANSACTIONID is NOT the PaymentInfo ID, it is the transaction id that is sent back from PayPal (authorization id). https://www.x.com/developers/paypal/doc ... ration-nvp
So, this assumes that an authorization was done previously.

We recommend that you extend the PayPalCheckoutService and add some additional methods to invoke just the Authorization Process and another method just to invoke the Debit Process (https://www.x.com/developers/paypal/doc ... ration-nvp and https://www.x.com/developers/paypal/doc ... ration-nvp). In this new method that invokes just the Debit process you can construct your payment info object with the appropriate transaction id.

Hope this helps.

Re: Paypal module

Posted: Tue Nov 20, 2012 4:56 am
by Bastiien
Thx for this answer.

now the express checkout is enought for us. we're finally not sure to use Paypal in production so the customization is not mandatory but we will keep your recommandation in our mind :)