Download the PHP package imlolman/ccavenue-php-sdk without Composer
On this page you can find all versions of the php package imlolman/ccavenue-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imlolman/ccavenue-php-sdk
More information about imlolman/ccavenue-php-sdk
Files in imlolman/ccavenue-php-sdk
Package ccavenue-php-sdk
Short Description Unofficial CCAvenue Payment Gateway Implimentation
License MIT
Informations about the package ccavenue-php-sdk
CCAvenue Payment Gateway PHP Integration Guide 🎉
Welcome to the CCAvenue Payment Gateway Integration guide! If you're here, you're likely navigating the maze that is CCAvenue integration.
Read the entire guide to have a good and comedic experience. Star the repository if you like it. Fear not! I've been through the trenches, and I'm here to make your journey smoother (and maybe even enjoyable!).
Table of Contents
- The Struggle is Real 😫
- Getting Started 🚀
- Integration Steps 🛠️
- 1. Initiating a Transaction
- 2. Handling the Response
- 3. Setting Up the Webhook
- Available Methods 🧰
- Understanding the Flow 🧭
- Final Thoughts 🤔
The Struggle is Real 😫
Let's be honest: integrating CCAvenue can be a nightmare. Here's why:
-
Terrible Portal UI: It's clunky, slow, and feels like it's from the early 2000s.
-
No Test Credentials Online: Unlike modern gateways, you can't just generate test credentials. You have to email them. Yes, in 2023.
-
Merchant Authentication Failed (Error 10002): This error will haunt you until you realize you need to whitelist your testing domain, including
localhost
. Again, via email. -
Chat Support? Meh: It's there, but don't expect miracles. You'll often need to pick up the phone.
-
Communication is Key: Your best bet is to call them directly at (+91 8801033323) or email [email protected].
- Same Credentials for Test & Production: Proceed with caution! You don't want to mix up test and live transactions.
Getting Started 🚀
Before diving in, make sure you have:
- A verified CCAvenue account (patience is a virtue here).
- Test Credentials (remember, email them to get these).
- A development environment with PHP (latest version) or Laravel.
Integration Steps 🛠️
1. Installing this Library
First, install the imlolman/ccavenue-php-sdk
package via Composer:
2. Initiating a Transaction
Here's how you start a transaction with CCAvenue:
3. Handling the Response
After the transaction, CCAvenue will redirect the user to your response.php
page:
4. Setting Up the Webhook
To receive automatic payment updates, set up a webhook.php
file:
Important: Email CCAvenue your webhook URL so they can enable webhook support for your account.
Available Methods 🧰
Here's a handy list of methods provided by the Imlolman\CCAvenue
library:
initiate($compulsoryInfo, $billingInfo, $shippingInfo)
Starts a transaction. Provide the order details, billing info, and shipping info. Returns a payment URL to redirect the customer.
verifyAndGetResponse()
Verifies the response from CCAvenue and returns the response array.
verifyAndGetSuccessResponse()
Verifies the response and checks if the order status is Success
.
checkIfOrderIsSuccess()
Checks if the transaction's order status is successful.
getOrderId()
Retrieves the order ID from the response.
getOrderAmount()
Gets the amount of the order.
getOrderCurrency()
Retrieves the currency used for the order.
getPaymentMode()
Gets the payment method used (e.g., Net Banking, Credit Card).
getBankReferenceNumber()
Retrieves the bank reference number for the transaction.
getTrackingId()
Gets the tracking ID assigned to the transaction by the gateway.
getBillingInfo()
Retrieves the billing details.
getDeliveryInfo()
Retrieves the shipping details.
getFailureMessage()
Gets the failure message if the transaction failed.
getMerchantParams()
Retrieves any merchant-specific parameters passed during the transaction.
Understanding the Flow 🧭
Here's how the entire process works:
Final Thoughts 🤔
Integrating CCAvenue isn't for the faint of heart, but with this guide, you're well on your way to mastering it. Remember:
- Whitelisting: Email them to whitelist your testing domain and
localhost
. - Webhooks: Send them your webhook URL to receive automatic updates.
- Patience: It's a virtue, especially when dealing with CCAvenue.
Happy coding! 🎉