This page contains information on using and testing the two types of cfpayment gateways used with PayPal: Name-Value Pair and SOAP.
The cfpayment core is created with gateway configuration options like so:
config = structNew();
config.path = "paypal.wpp.NVPGateway";
config.username = "paypal_99999999_biz_api1.paypal.com";
config.password= "abc123xyz789";
config.signature= "AbcDEfgHiJKlMNoPQrstUvWXYz0123456789";
config.returnURL = "http://localhost/cfpayment/api/gateway/paypal/wpp/tests/NVPGatewayTest.cfc?method=runTestRemote&method=testCompleteExpressCheckout";
config.cancelURL = "http://localhost/cfpayment/api/gateway/paypal/wpp/tests/NVPGatewayTest.cfc?method=runTestRemote&method=testCancelExpressCheckout";
cfpayment = createObject("component", "cfpayment.api.core").init(config=config);
gateway = cfpayment.getGateway();
The PayPal SOAP API support is a big TODO right now.
The NVPGatewayTest MXUnit Test Case contains many individual tests, however it's best to call the two major test methods directly, as the Express Checkout process has a specific order. Before running the Express Checkout test, login to the PayPal Sandbox.