Adyen is a single payments platform to accept payments anywhere, on any device. The Adyen API Wrapper for Coldfusion enables you to work with Adyen APIs and Hosted Payment Pages with ColdFusion / Lucee. You can refer further details in adyen payment official documentation.Adyen support SOAP, FORM and JSON format. we prefered to use JSON format, as it is easy & current industry standard.
This is a simple demo code snippets for few of the most used Adyen payment gateway operations. In this demo, we implemented Payment methods, Create Payment, Capture, Refund and Cancel
Queries the available payment methods for a transaction based on the transaction context (like amount, country, and currency).Besides giving back a list of the available payment methods, the response also returns which input details you need to collect from the shopper.
cfhttp( method="post", charset="utf-8", url="https://checkout-test.adyen.com/v32/paymentMethods", result="ApiResponse")
Creates a payment with a unique reference (pspReference) and attempts to obtain an authorization hold. For cards, this amount can be captured or canceled later. We could save this pspReference in DB to make subsequent payments with out asking to enter the same card details once again. As we are not saving customer's credit card details, we are covering the PCI compliance too. Non-card payment methods typically don't support this and will automatically capture as part of the authorization.
cfhttp(method="post", charset="utf-8", url="https://pal-test.adyen.com/pal/servlet/Payment/v30/authorise", result="ApiResponse")
Captures the authorization hold on a payment, returning a unique reference for this request. Usually the full authorization amount is captured, however it's also possible to capture a smaller amount, which results in cancelling the remaining authorization balance.
cfhttp(method="post", charset="utf-8", url="https://pal-test.adyen.com/pal/servlet/Payment/v30/capture", result="ApiResponse")
Refunds a payment that has previously been captured, returning a unique reference for this request. Refunding can be done on the full captured amount or a partial amount. Multiple (partial) refunds will be accepted as long as their sum doesn't exceed the captured amount. Payments which have been authorized, but not captured, cannot be refunded.
cfhttp(method="post", charset="utf-8", url="https://pal-test.adyen.com/pal/servlet/Payment/v30/cancel", result="ApiResponse")
Cancel a payment if it has not been captured yet, or refunds it if it has already been captured. This is useful when it is not certain if the payment has been captured or not.
cfhttp(method="post", charset="utf-8", url="https://pal-test.adyen.com/pal/servlet/Payment/v30/refund", result="ApiResponse")