Search code examples
javashopping-cartsimplecart

how to bypass paypal checkout and send simplecart details through email in javamail using servlet?


I have implemented simpleCart in my project.

I want such a solution that, whenever I click on checkout, instead of going to paypal the simpleCart contents should be sent to a servlet where the servlet sends it as an email using javamail class in java

I googled this query but the solution I found was for PHP and I am not familiar with PHP.

Anyone knowing how to do it using java please share.


Solution

  • I am not familiar with Java, but you can edit the checkout method in simplecart. For example you can send a form:

    simpleCart({
        checkout: {
            type: "SendForm" ,
            url: "http://example.com/your/custom/checkout/url" ,
            method: "GET" ,
            success: "success.html" ,
            cancel: "cancel.html" ,
            extra_data: {
                customInfo1: "some custom information",
                customInfo2: "12321321"
            }
        }
    });
    

    And with that you can handle the data in your custom servlet. For further Information read the simplecart docs.