=== Payment Gateway for CCBill One Time and Recurring – Woo and WooSubscription ===
Contributors: swetark
Tags: woocommerce, payment gateway, subscription, recurring payments, credit card
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Accept both one-time and recurring WooCommerce payments via CCBill with FlexForms and WooCommerce Subscriptions support.

== Description ==

**Accept CCBill One-Time & Recurring Payments in WooCommerce.**

This plugin integrates CCBill with your WooCommerce store, allowing you to accept both one-time and recurring payments via CCBill FlexForms. It also supports WooCommerce Subscriptions for recurring billing workflows.

**Features:**

* Accept one-time and recurring CCBill payments
* Compatible with WooCommerce Subscriptions
* Supports CCBill FlexForms
* Supports WooCommerce Checkout Blocks
* Declares WooCommerce HPOS compatibility
* Prevents multiple subscriptions in the same cart
* Supports multiple CCBill currency codes: USD, EUR, GBP, CAD, AUD, JPY
* Subscription cancellation support through CCBill DataLink API
* Built-in setup instructions and webhook URL display
* Debug logging with sensitive values redacted

> Note: Recurring payments require the WooCommerce Subscriptions plugin.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install via the Plugins screen in WordPress.
2. Activate the plugin.
3. Go to **WooCommerce > Settings > Payments > CCBill** and configure:
   * CCBill Account Number
   * One-time Sub Account ID
   * Recurring Sub Account ID
   * One-time FlexForm ID
   * Recurring FlexForm ID
   * Currency Code
   * Dynamic Pricing Salt Key
4. In CCBill, configure the webhook/IPN URL shown in the gateway settings.
5. Select these CCBill events where available: NewSaleSuccess, NewSaleFailure, RenewalSuccess, RenewalFailure, Cancellation, Expiration, Refund, Chargeback, Void.
6. Install and activate WooCommerce Subscriptions if recurring payments are needed.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce Subscriptions? =

No, one-time payments can work without it. Recurring payments require WooCommerce Subscriptions.

= Does this support CCBill FlexForms? =

Yes. FlexForms are supported for both one-time and recurring payments.

= Can customers purchase more than one subscription? =

No. The plugin restricts the cart to one subscription plan per order.

= What webhook URL should I enter in CCBill? =

Use the URL shown in **WooCommerce > Settings > Payments > CCBill**. It normally looks like:

`https://example.com/?wc-api=RPGWCC_Gateway`

= Why are renewals marked on-hold first? =

CCBill controls recurring billing offsite. WooCommerce renewal orders are held until CCBill sends the RenewalSuccess webhook.

== External Services ==

This plugin integrates with CCBill for payment processing.

**Services Used:**

* https://api.ccbill.com — used for FlexForm payment redirection
* https://datalink.ccbill.com — used for subscription cancellation requests when DataLink credentials are configured

**Data Sent:**

During checkout, customer billing details, order amount, CCBill account/sub-account values, FlexForm ID, currency code, and WooCommerce order ID are sent to CCBill so CCBill can process the payment. For recurring products, subscription pricing/period data is also sent.

**Service Policies:**

* Terms of Use: https://www.ccbill.com/terms-of-use
* Privacy Policy: https://www.ccbill.com/privacy-notice

== Screenshots ==

1. Payment method settings in WooCommerce
2. FlexForm checkout redirection
3. Admin settings for recurring and one-time options

== Changelog ==

= 1.1.0 =
* Added proper WooCommerce `process_payment()` redirect flow.
* Fixed FlexForm ID variable issue that could send an empty form name to CCBill.
* Fixed webhook endpoint mismatch and added backward-compatible endpoint handling.
* Fixed order status flow so orders are placed on-hold while awaiting CCBill confirmation instead of failed before payment.
* Added handling for NewSaleSuccess, NewSaleFailure, RenewalSuccess, RenewalFailure, Cancellation, Expiration, Refund, Chargeback, and Void events.
* Added WooCommerce renewal order creation on CCBill RenewalSuccess events.
* Added WooCommerce scheduled subscription payment support for offsite CCBill renewals.
* Added HPOS compatibility declaration.
* Added Checkout Blocks support.
* Improved DataLink cancellation handling and redacted sensitive values in debug logs.
* Updated setup instructions and webhook event recommendations.

= 1.0 =
* Initial release.
* Supports one-time and recurring payments.
* CCBill FlexForm integration.
* WooCommerce Subscriptions compatibility.

== Upgrade Notice ==

= 1.1.0 =
Important reliability update. Fixes checkout redirect, webhook endpoint mismatch, FlexForm ID handling, and recurring renewal processing.

= 1.0 =
Initial release. Requires WooCommerce Subscriptions for recurring payments.

== Support ==

Need help setting up?

* Email: info@nephilainc.com
* WhatsApp: +91 9913783777
* Skype: joomlaexpert.ce@gmail.com
* Website: https://nephilainc.com/

== Donate ==

If this plugin helps your business, consider buying me a coffee: https://nephilainc.com/
