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 String
createPaypalPayment(ContentContext ctx, Basket basket, URL returnURL, URL cancelURL)
String
executePaypalPayment(String paymentToken, String payerID)
static String
formatDouble(double dbl)
com.paypal.api.payments.Payment
getPayment()
static void
main(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)
-
-