OFBiz
  1. OFBiz
  2. OFBIZ-934

PayPal Express Checkout Support in Ecommerce Checkout Process.

    Details

      Description

      Implement Support for PayPal Express Checkout. Some help is available at following locations.

      https://www.paypal.com/IntegrationCenter/ic_expresscheckout.html

      https://www.paypal.com/IntegrationCenter/ic_nvp.html

        Activity

        Anil K Patel created issue -
        Hide
        Scott Gray added a comment -

        I'll be implementing PayPal's Express Checkout into OFBiz over the next few days, if anybody has any questions, comments or suggestions you're most welcome to post them here.

        Show
        Scott Gray added a comment - I'll be implementing PayPal's Express Checkout into OFBiz over the next few days, if anybody has any questions, comments or suggestions you're most welcome to post them here.
        Scott Gray made changes -
        Field Original Value New Value
        Assignee Scott Gray [ lektran ]
        Scott Gray committed 793866 (20 files)
        Reviews: none

        Initial implementation of the Payflow Pro version of PayPal's Express Checkout OFBIZ-934

        ofbiz trunk
        Hide
        Scott Gray added a comment -

        Initial implementation committed in r793866

        Show
        Scott Gray added a comment - Initial implementation committed in r793866
        Scott Gray made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s SVN trunk [ 12311928 ]
        Resolution Fixed [ 1 ]
        Hide
        Hans Bakker added a comment -
        Show
        Hans Bakker added a comment - Hi Scott, in order to use this, can we still use the setup directions at http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide#ApacheOFBizBusinessSetupGuide-payPalPaymentSetup ?
        Hide
        Scott Gray added a comment -

        Hi Hans

        The current implementation uses the Payflow Pro SDK, so you won't be able to use it unless your processing credit cards with Payflow. Assuming you are then you just need to fill in the additional details in the applicable PaymentGatewayPayflowPro and then uncomment the ProductStorePaymentSetting records in DemoProduct.xml and comment out the existing PayPal record

        Show
        Scott Gray added a comment - Hi Hans The current implementation uses the Payflow Pro SDK, so you won't be able to use it unless your processing credit cards with Payflow. Assuming you are then you just need to fill in the additional details in the applicable PaymentGatewayPayflowPro and then uncomment the ProductStorePaymentSetting records in DemoProduct.xml and comment out the existing PayPal record
        Hide
        Shoab Khan added a comment -

        Hey Scott, as far as I can tell from the Ofbiz configuration, there seems to be 2 types of integrations for PayPal, the link that Hans posted above and this:
        http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide#ApacheOFBizBusinessSetupGuide-payflowProPaymentSetup

        Is the setup config in the link Hans provided no longer working? Is it just a dead option? And Ofbiz only works with Payflow Pro for any type of PayPal transactions whether it be CC or the PayPal Express checkouts?

        I am trying to use PayPal Config, to set up PayPal so that there can be an option in the cart to use PayPal Express (which is the option that shoots the user to PayPals website similar to how Google Checkout works) but I want to continue to also use Authorize.Net
        Is this not possible with what Ofbiz has built in already?

        Show
        Shoab Khan added a comment - Hey Scott, as far as I can tell from the Ofbiz configuration, there seems to be 2 types of integrations for PayPal, the link that Hans posted above and this: http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide#ApacheOFBizBusinessSetupGuide-payflowProPaymentSetup Is the setup config in the link Hans provided no longer working? Is it just a dead option? And Ofbiz only works with Payflow Pro for any type of PayPal transactions whether it be CC or the PayPal Express checkouts? I am trying to use PayPal Config, to set up PayPal so that there can be an option in the cart to use PayPal Express (which is the option that shoots the user to PayPals website similar to how Google Checkout works) but I want to continue to also use Authorize.Net Is this not possible with what Ofbiz has built in already?
        Hide
        BJ Freeman added a comment -

        not sure of scotts implemtation plans.
        the orginal Paypal in ofbiz is IPN based.
        it takes the user to paypal to do the CC transaction then return info of the transaction
        it works
        I use it.

        Show
        BJ Freeman added a comment - not sure of scotts implemtation plans. the orginal Paypal in ofbiz is IPN based. it takes the user to paypal to do the CC transaction then return info of the transaction it works I use it.
        Hide
        Shoab Khan added a comment -

        Hey BJ, thanks for the input.
        Do you have any idea what the request URI the button should be calling to send it off the PayPal (IPN Based) in the current release of Ofbiz?

        Show
        Shoab Khan added a comment - Hey BJ, thanks for the input. Do you have any idea what the request URI the button should be calling to send it off the PayPal (IPN Based) in the current release of Ofbiz?
        Hide
        BJ Freeman added a comment -

        this one is not the same as IPN
        use
        https://issues.apache.org/jira/browse/OFBIZ-2643

        Show
        BJ Freeman added a comment - this one is not the same as IPN use https://issues.apache.org/jira/browse/OFBIZ-2643
        Hide
        Scott Gray added a comment -

        Reopening as I'll be implementing Express Checkout using the regular NVP API over the coming days which will mean you can use it without Payflow and also allow for a full checkout process.

        If anyone is interested in helping to test the implementation please let me know.

        Show
        Scott Gray added a comment - Reopening as I'll be implementing Express Checkout using the regular NVP API over the coming days which will mean you can use it without Payflow and also allow for a full checkout process. If anyone is interested in helping to test the implementation please let me know.
        Scott Gray made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Shoab Khan added a comment - - edited

        Hey, I can help test it out, let me know if/when you want to.

        Show
        Shoab Khan added a comment - - edited Hey, I can help test it out, let me know if/when you want to.
        Hide
        Scott Gray added a comment -

        Thanks Shoab, I'll get the checkout process implemented first and post instructions here for testing and then I'll move on to the back-end payment processing side of things.

        Show
        Scott Gray added a comment - Thanks Shoab, I'll get the checkout process implemented first and post instructions here for testing and then I'll move on to the back-end payment processing side of things.
        Scott Gray committed 803151 (15 files)
        Reviews: none

        Initial implementation of the standard PayPal Express Checkout (i.e. not using Payflow Pro) OFBIZ-934

        There are still a couple of issues preventing the checkout from being 100% functional:
        1. I'm having trouble getting Instant Update API to work correctly which is used by PayPal to retrieve shipping estimates from OFBiz
        2. The shipping option label and name parameters aren't working as documented and means I'm currently stuck presenting the shipping option id (partyId@shipmentMethodTypeId) to the user

        Hide
        Scott Gray added a comment -

        Initial implementation of the standard PayPal Express Checkout (i.e. not using Payflow Pro) committed in rev. 803151

        There are still a couple of issues preventing the checkout from being 100% functional:
        1. I'm having trouble getting Instant Update API to work correctly which is used by PayPal to retrieve shipping estimates from OFBiz
        2. The shipping option label and name parameters aren't working as documented and means I'm currently stuck presenting the shipping option id (partyId@shipmentMethodTypeId) to the user

        I'll try and make some time tomorrow to write some set up notes for those interested in testing (or just using) it.

        Show
        Scott Gray added a comment - Initial implementation of the standard PayPal Express Checkout (i.e. not using Payflow Pro) committed in rev. 803151 There are still a couple of issues preventing the checkout from being 100% functional: 1. I'm having trouble getting Instant Update API to work correctly which is used by PayPal to retrieve shipping estimates from OFBiz 2. The shipping option label and name parameters aren't working as documented and means I'm currently stuck presenting the shipping option id (partyId@shipmentMethodTypeId) to the user I'll try and make some time tomorrow to write some set up notes for those interested in testing (or just using) it.
        Hide
        Shoab Khan added a comment -

        I will go ahead and try this out in the next few days.

        Show
        Shoab Khan added a comment - I will go ahead and try this out in the next few days.
        Hide
        Corey Italiano added a comment -

        I'm also working on this section of the code. I modified the payPalCheckoutUpdate service so that instead of calculating different rates, the only thing that gets sent to PayPal is a flat shipping rate that we define and use throughout the web store.

        The problem I am running into now is that when PayPal sends its call back request to my server for the shipping options, our server writes back the proper flat amount but that value never gets placed onto the screen unless a "condition" is met. If the "condition" is not met it remains at 0.00 with the option name "Calculated Offline". That "condition" is if the first line item has a quantity greater than 1. The reason i put condition in quotes is that I don't see anywhere in the code that says to do anything differently based on the quantity of a line item.

        So, basically, if i add an item to the cart and go through pay pal, the shipping estimate comes to 0 even though our correct flat rate is sent during the call back. If, after adding the item, you change the quantity to let's say 2, when you then run the order through paypal, it "recognizes" the new shipping amount that was sent back to it. Same code, only difference is the quantity. When it's set to 1, it doesn't work, otherwise it does.

        So, I wanted to see if you, Scott, had made any progress as I see you also were having troubles with the shipping estimates.

        Show
        Corey Italiano added a comment - I'm also working on this section of the code. I modified the payPalCheckoutUpdate service so that instead of calculating different rates, the only thing that gets sent to PayPal is a flat shipping rate that we define and use throughout the web store. The problem I am running into now is that when PayPal sends its call back request to my server for the shipping options, our server writes back the proper flat amount but that value never gets placed onto the screen unless a "condition" is met. If the "condition" is not met it remains at 0.00 with the option name "Calculated Offline". That "condition" is if the first line item has a quantity greater than 1. The reason i put condition in quotes is that I don't see anywhere in the code that says to do anything differently based on the quantity of a line item. So, basically, if i add an item to the cart and go through pay pal, the shipping estimate comes to 0 even though our correct flat rate is sent during the call back. If, after adding the item, you change the quantity to let's say 2, when you then run the order through paypal, it "recognizes" the new shipping amount that was sent back to it. Same code, only difference is the quantity. When it's set to 1, it doesn't work, otherwise it does. So, I wanted to see if you, Scott, had made any progress as I see you also were having troubles with the shipping estimates.
        Hide
        Scott Gray added a comment -

        Hi Corey,

        If the shipping option is the only one you use then you would be better off modifying the setExpressCheckout service to send it as a default in place of "Calculated Offline" option and then don't specify a callbackurl. That will save unnecessary callbacks since you already know what your shipping rate will be before receiving the shipping address.

        I've had no problems processing orders with a quantity of one, I did it many times trying testing without issue.

        My problem with the shipping callback ended being because I was specify port 8443 in the callbackurl which paypal didn't like, you can't specify a port number in the url only http or https. The other problem was that paypal stupidly only returns the label of the shipping option and not a hidden identifier meaning that you have to attempt to look up the chosen shipping methods by description.

        I would suggest that you pull the request strings and responses being sent to/from paypal from the logs and ask for help on their forums, they are quite responsive (so long as the problem isn't too difficult to answer).

        Show
        Scott Gray added a comment - Hi Corey, If the shipping option is the only one you use then you would be better off modifying the setExpressCheckout service to send it as a default in place of "Calculated Offline" option and then don't specify a callbackurl. That will save unnecessary callbacks since you already know what your shipping rate will be before receiving the shipping address. I've had no problems processing orders with a quantity of one, I did it many times trying testing without issue. My problem with the shipping callback ended being because I was specify port 8443 in the callbackurl which paypal didn't like, you can't specify a port number in the url only http or https. The other problem was that paypal stupidly only returns the label of the shipping option and not a hidden identifier meaning that you have to attempt to look up the chosen shipping methods by description. I would suggest that you pull the request strings and responses being sent to/from paypal from the logs and ask for help on their forums, they are quite responsive (so long as the problem isn't too difficult to answer).
        Scott Gray made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Gavin made changes -
        Workflow jira [ 12402857 ] OFbiz Workflow [ 12506709 ]

          People

          • Assignee:
            Scott Gray
            Reporter:
            Anil K Patel
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development