Package org.javlo.ecom
Class PaypalConnector
- java.lang.Object
-
- org.javlo.ecom.PaypalConnector
-
public class PaypalConnector extends Object
-
-
Constructor Summary
Constructors Constructor Description PaypalConnector(String baseUrl, String user, String password)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreatePaypalPayment(ContentContext ctx, Basket basket, URL returnURL, URL cancelURL)StringexecutePaypalPayment(String paymentToken, String payerID)static StringformatDouble(double dbl)com.paypal.api.payments.PaymentgetPayment()static voidmain(String[] args)
-
-
-
Method Detail
-
getPayment
public com.paypal.api.payments.Payment getPayment()
-
formatDouble
public static String formatDouble(double dbl)
-
createPaypalPayment
public String createPaypalPayment(ContentContext ctx, Basket basket, URL returnURL, URL cancelURL) throws Exception
- Throws:
Exception
-
executePaypalPayment
public String executePaypalPayment(String paymentToken, String payerID) throws com.paypal.core.rest.PayPalRESTException
- Throws:
com.paypal.core.rest.PayPalRESTException
-
main
public static void main(String[] args)
-
-