=== PlanetStudio Payment Gateway ===
Contributors: planetstudio
Tags: payment gateway, arca, armenian banks, idram
Requires at least: 6.5
Requires PHP: 7.4
Tested up to: 6.9
Stable tag: 1.2.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: planetstudio-payment-gateway
Domain Path: /languages

Accept payments via Armenian banks, Idram and Telcell. WooCommerce, GiveWP, PayLink, WPForms and eHDM (Էլեկտրոնային ՀԴՄ) integration, with multi-bank and multi-currency support.
== Description ==

PlanetStudio Payment Gateway allows merchants to accept online payments via Armenian banks, as well as the Idram and Telcell wallet payment systems.

This plugin provides the PSPG Core and PayLink payments.
Additional platform integrations (such as WooCommerce, GiveWP, WPForms and PayForm) are available as separate add-ons.

PlanetStudio Payment Gateway supports multiple Armenian acquiring banks, test and production modes, and provides detailed payment and callback logs in the WordPress admin area.

Depending on the selected bank or payment system, merchants may need to obtain API credentials or other access details from their bank or payment provider.

== Supported Banks & Payment Systems ==

**ArCa (Armenian Card)**
- ACBA Bank (ACBABank)
- Araratbank (Ararat Bank)
- Armeconombank (Armeconom Bank)
- Armswissbank (Armswiss Bank)
- Ardshinbank (Ardshin Bank)
- Byblos Bank Armenia
- Converse Bank
- Evocabank (Evoca Bank)
- Fast Bank
- IDBank (ID Bank)

**Banks with independent processing**
- AMIO Bank
- Ameriabank (Ameria Bank)
- Inecobank (Ineco, Ineco Bank)

**Other payment systems**
- Idram Wallet
- Telcell Wallet

== Features ==

- PayLink (Payment by Link / QR)
- Support for multiple Armenian banks
- Credit and debit card payments
- 3-D Secure support (when provided by the bank)
- Multi-currency support (AMD, USD, EUR, RUB — depending on bank configuration)
- Test and production modes
- Detailed payment and callback logs in WordPress admin
- Secure server-to-server payment callbacks

== PayLink (Payment by Link / QR) ==

PlanetStudio Payment Gateway includes a PayLink feature that allows administrators
to create payment links (including QR-based flows) manually and send them to customers
via email, messengers, or any other communication channel.

PayLink works independently from e-commerce or donation plugins and can be used
for manual payments, invoices, advance payments, or one-time charges.

How PayLink works:

- Administrator creates a PayLink from PSPG → PayLink in the WordPress admin area.
- A unique payment link is generated for the specified amount and bank.
- The customer opens the link (or scans a QR code) and is redirected to the bank’s secure hosted payment page.
- After successful payment, the transaction is finalized and logged in PSPG.

== PayForm ==

PayForm functionality is available via a separate add-on.

The PayForm add-on allows administrators to embed a customizable public payment form using a shortcode and process payments through PSPG-supported banks.

== Integrations ==

PlanetStudio Payment Gateway provides a Core payment framework.

Additional integrations such as WooCommerce, GiveWP, and PayForm, eHDM (Էլեկտրոնային ՀԴՄ) are available as separate add-ons.

== Getting Started ==

After activating the plugin, go to the PSPG settings page in the WordPress admin area and configure at least one payment provider.

To start using the plugin:

1. Install and activate PlanetStudio Payment Gateway.
2. Open PSPG → Settings in the WordPress admin area.
3. Enable at least one payment provider.
4. Enter the credentials provided by your bank or payment provider.
5. Select test mode or live mode depending on your environment.
6. Save the settings.

The core plugin includes built-in PayLink functionality and can be used without WooCommerce or other add-ons.

== How to Test the Plugin ==

The easiest way to test the plugin is using the built-in PayLink feature.

1. Go to PSPG → PayLink in the WordPress admin area.
2. Create a new PayLink by selecting a configured payment provider and entering an amount.
3. Open the generated payment link in your browser.
4. You will be redirected to the payment provider’s hosted payment page.
5. Complete the payment using test credentials (if test mode is enabled).
6. After payment, verify the result and logs in the PSPG admin area.

If no payment provider is configured, PayLink and other payment flows will not work.

== Configuration Notes ==

This plugin requires merchant credentials provided by the selected Armenian bank or payment provider.

Depending on the provider, you may need:
- test credentials for sandbox/testing
- live credentials for production
- provider-specific merchant settings

WooCommerce, GiveWP, and PayForm integrations are available as separate add-ons and are not required to test the core PayLink functionality.

== Installation ==

1. Upload the `planetstudio-payment-gateway` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through Plugins → Installed Plugins.
3. Configure the payment gateway credentials provided by your bank or payment system.

== eHDM Fiscal Receipt Integration ==

PlanetStudio Payment Gateway can integrate with the separate PlanetStudio eHDM (Էլեկտրոնային ՀԴՄ) plugin for fiscal receipt handling.

eHDM (Էլեկտրոնային ՀԴՄ) is an optional external plugin and is not required for PSPG operation.

== Frequently Asked Questions ==

= Does this plugin support PayPal? =
No. This plugin supports card payments via Armenian banks and Idram Wallet only.

= Does this plugin support credit and debit cards? =
Yes, card payments are supported according to the acquiring bank’s capabilities.

= What currencies are supported? =
AMD, USD, EUR, and RUB depending on the bank configuration.

= Can non-Armenian merchants use this plugin? =
Merchants must have a contract with an Armenian bank or payment provider to obtain API credentials.

= Does this plugin work with WooCommerce? =
WooCommerce integration is available via a separate PSPG add-on.

= Does this plugin work with GiveWP? =
GiveWP integration is available via a separate PSPG add-on.

= Does the plugin support test mode? =
Yes. Test and production modes are supported depending on the bank API.

== Screenshots ==

1. PSPG Orders dashboard showing real-time payment logs and transaction statuses
2. PayLink creation interface (create payment links and accept payments without a website)
3. PSPG Add-ons ecosystem with integrations for WooCommerce, GiveWP, WPForms, PayForm, and eHDM (Էլեկտրոնային ՀԴՄ)
4. Bank settings panel with multi-bank configuration support
5. PayForm builder with dynamic shortcode generation
6. eHDM (Էլեկտրոնային ՀԴՄ) integration for electronic receipt management
7. Currency rates panel with multi-currency support
8. Tools and migration utilities for legacy data import
9. WordPress Dashboard widgets for PSPG payment summaries and add-on status monitoring

== External Services ==

This plugin connects to external services only when the corresponding payment method or PayLink functionality is configured and used.

The plugin does not send customer banking credentials to these services.
When a payment is initiated, the plugin may send transaction-related data required by the selected provider, such as:
- payment amount
- currency
- payment description
- merchant order or transaction identifier
- return / callback URL needed to complete the payment flow

= ArCa Payment System (Armenian Card) =

This plugin can connect to the ArCa payment infrastructure to process card payments for supported ArCa-based banks.

This service is used only when an ArCa-based payment method is enabled and selected for payment.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://ipay.arca.am
- https://ipaytest.arca.am

Privacy policy:
- https://arca.am/privacy-policy

= Ameriabank vPOS =

This plugin can connect to Ameriabank vPOS to process card payments.

This service is used only when the Ameriabank payment method is enabled and selected for payment.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://services.ameriabank.am
- https://servicestest.ameriabank.am

Privacy policy:
- https://ameriabank.am/website-privacy-policy

= AMIO Bank =

This plugin can connect to AMIO Bank payment endpoints to process card payments.

This service is used only when the AMIO Bank payment method is enabled and selected for payment.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://epg.armbusinessbank.am
- https://epg-test.armbusinessbank.am

Legal / service information:
- https://amiobank.am/en/legal-documents

= IDBank =

This plugin can connect to IDBank payment infrastructure to process card payments.

This service is used only when the IDBank payment method is enabled and selected for payment.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URL:
- https://ipayproxy.idp.am

Terms:
- https://idbank.am/en/information/helpfull-information/Remote-services-ENG.pdf

Privacy policy:
- https://idbank.am/documents/RL-0900-0001-01_ENG.pdf

= Inecobank =

This plugin can connect to Inecobank payment endpoints to process card payments.

This service is used only when the Inecobank payment method is enabled and selected for payment.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://pg.inecoecom.am
- https://ipaytest.inecobank.am
- https://ipay.inecobank.am

Privacy policy:
- https://www.inecobank.am/en/useful-information/privacy-policy

= Idram Wallet =

This plugin can connect to Idram Wallet services to process wallet-based payments.

This service is used only when the Idram payment method is enabled and selected for payment.

Depending on the payment flow and provider-side functionality, the plugin may also connect to Idram authentication and related service endpoints.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://banking.idram.am
- https://csauth.idram.am
- https://cashback.idram.am

Terms:
- https://www.idram.am/Media/Documents/terms-and-conditions-eng.pdf

Privacy policy:
- https://money.idram.am/en/documents/privacy.htm

= Telcell Wallet =

This plugin can connect to Telcell Wallet services to process wallet-based payments.

This service is used only when the Telcell payment method is enabled and selected for payment.

Depending on the payment flow and provider-side functionality, the plugin may also connect to Telcell payment and related service endpoints.

Data sent may include:
- payment amount
- currency
- payment description
- merchant order identifier
- return URL / callback URL

Service URLs:
- https://telcellmoney.am

Terms:
- https://telcell.am/en/legal-acts

= goQR / QRServer =

This plugin can connect to the goQR / QRServer API to generate QR code images for PSPG PayLink pages.

This service is used only when a PayLink page with QR code output is generated or displayed.

Data sent may include:
- the PayLink URL that should be encoded into the QR code

No payment card data, banking credentials, or customer authentication data are sent to this service.

Service URL:
- https://api.qrserver.com

Terms:
- https://goqr.me/legal/tos-api.html

Privacy policy:
- https://goqr.me/privacy-safety-security/

== Changelog ==

= 1.2.6 =
- Added direct PSPG Orders links with focused order filtering and row highlighting.
- Improved dashboard widget footer links for faster access to Orders and PayLinks.
- Added a Dashboard Widgets screenshot entry.

= 1.2.5 =
- Added a WordPress Dashboard payments summary widget for live PSPG orders.
- Improved PSPG settings bank tab hover stability in the WordPress admin.

= 1.2.4 =
- Fixed PayLink return handling to sync existing bank payments before reusing the bank redirect.
- Added PSPG Orders table extension hooks for integration add-ons.
- Added PayLink success page and customer receipt email hooks for add-on integrations.

= 1.2.3 =
- Fixed the release package to include the required DB installer file.
- Added release build validation for required and excluded files.

= 1.2.2 =
- Scoped PSPG settings admin styles to avoid conflicts with other admin CSS.

= 1.2.1 =
- Added missing allowed redirect hosts for ArCa and Telcell payment flows
- Fixed PayLink redirects for external bank payment pages

= 1.2.0 =
- Added Telcell Wallet support
- Added Telcell callback and redirect handling
- Added Telcell support for PayLink
- Added source-aware Telcell result and redirect flow for WooCommerce and PayLink
- Added Telcell support for WooCommerce classic checkout
- Added Telcell support for WooCommerce Blocks
- Added AMD-only validation and internal currency normalization for Telcell
- Improved Telcell payment result handling
- Improved translation loading from the plugin languages directory
- Added Telcell-related updates to plugin description and documentation

= 1.1.9 =
- Improved admin settings UI (bank sorting and default selection)
- Extended add-ons notice dismissal period
- Minor UI and CSS improvements

= 1.1.8 =
- Updated public release to match the current stable production version.
- Improved PayLink flow and public API behavior.
- Added WordPress.org compliance fixes for request sanitization and script enqueueing.
- General stability and compatibility improvements.

= 1.1.7 =
- Added PSPG PayLink public API function (pspg_create_paylink)
- Refactored PayLink creation logic to reusable service method
- Added currency normalization support for PayLink (AMD / ISO numeric)
- Unified PayLink behavior with PSPG public API architecture
- Added developer documentation for PSPG PayLink API

= 1.1.6 =
- Added public PSPG API functions for direct payment operations (create, sync, refund, void, binding)
- Added support for saved card (binding) payment flow
- Standardized clientId handling across API (clientId / client_id)
- Minor internal improvements and code cleanup

= 1.1.5 =
- Improved Inecobank gateway integration and stability
- Aligned Ineco responses with PSPG standard contract
- Fixed binding payment handling and parameter compatibility
- Minor internal improvements and code cleanup

= 1.1.4 =
- Updated Token Service endpoint domain
- Minor improvements and compatibility updates

= 1.1.3 =
- Fix arca banks endpoint_live_default

= 1.1.2 =
- Added Currency Switcher Add-on integration

= 1.1.0 =
- Added Currency Switcher Add-on integration
- Added Currency Switcher Add-on card to the integrations screen
- Prepared core for currency tools support

= 1.0.0 =
- Initial release
