Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [3.8.5]
- Support gateway form independent of the plugin/theme styling.

## [3.8.4]
- Add support for Checkout Design v2.

Expand Down
7 changes: 4 additions & 3 deletions altapay.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* Author URI: https://altapay.com
* Text Domain: altapay
* Domain Path: /languages
* Version: 3.8.4
* Version: 3.8.5
* Name: SDM_Altapay
* WC requires at least: 3.9.0
* WC tested up to: 10.2.1
* WC tested up to: 10.2.2
*
* @package Altapay
*/
Expand Down Expand Up @@ -41,7 +41,7 @@
}

if ( ! defined( 'ALTAPAY_PLUGIN_VERSION' ) ) {
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.4' );
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.5' );
}

// Include the autoloader, so we can dynamically include the rest of the classes.
Expand Down Expand Up @@ -227,6 +227,7 @@ function altapay_page_template( $template ) {
$callbackPages = array(
'altapay_payment_page' => 'altapay-payment-form.php',
'altapay_callback_redirect_page' => 'altapay-callback-redirect.php',
'altapay_external_payment_page' => 'altapay-payment-form-external.php',
);

foreach ( $callbackPages as $optionKey => $templateFile ) {
Expand Down
24 changes: 24 additions & 0 deletions classes/core/AltapayPluginInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,29 @@ public static function createCallbackRedirectPage() {
update_option( 'altapay_callback_redirect_page', $page_id );
}
}

/**
* Create new page for external checkout.
*
* @return void
*/
public static function createExternalPaymentPage() {

if ( empty( trim( get_option( 'altapay_external_payment_page' ) ) ) ) {
$page_data = array(
'post_status' => 'publish',
'post_type' => 'page',
'post_author' => 1,
'post_title' => 'AltaPay Payment Form External',
'post_content' => '',
'post_parent' => 0,
'comment_status' => 'closed',
);

$page_id = wp_insert_post( $page_data );

update_option( 'altapay_external_payment_page', $page_id );
}
}
}

9 changes: 9 additions & 0 deletions classes/core/AltapaySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ public function altapayRegisterSettings() {
register_setting( 'altapay-settings-group', 'altapay_fraud_detection_action' );
register_setting( 'altapay-settings-group', 'altapay_payment_page' );
register_setting( 'altapay-settings-group', 'altapay_cc_form_styling' );
register_setting( 'altapay-settings-group', 'altapay_payment_page_layout' );
register_setting(
'altapay-settings-group',
'altapay_terminals_enabled',
Expand Down Expand Up @@ -338,6 +339,7 @@ public function altapaySettings() {
$altapay_fraud_detection = get_option( 'altapay_fraud_detection' );
$altapay_fraud_detection_action = get_option( 'altapay_fraud_detection_action' );
$cc_form_styling = get_option( 'altapay_cc_form_styling' );
$payment_page_layout = get_option( 'altapay_payment_page_layout' );

if ( $terminalDetails ) {
$terminals = json_decode( get_option( 'altapay_terminals' ) );
Expand Down Expand Up @@ -398,6 +400,7 @@ public function altapaySettings() {
'altapay_fraud_detection' => $altapay_fraud_detection,
'altapay_fraud_detection_action' => $altapay_fraud_detection_action,
'cc_form_styling' => $cc_form_styling,
'payment_page_layout' => $payment_page_layout,

)
);
Expand Down Expand Up @@ -614,6 +617,12 @@ function altapayCapturesPostInit() {
if ( empty( $callback_redirect_page ) ) {
Core\AltapayPluginInstall::createCallbackRedirectPage();
}

$external_payment_page = get_option( 'altapay_external_payment_page' );

if ( empty( $external_payment_page ) ) {
Core\AltapayPluginInstall::createExternalPaymentPage();
}
}

/**
Expand Down
46 changes: 23 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/independent_payment_page_layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/payment_page_layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Tags: AltaPay, Gateway, Payments, WooCommerce, Payment Card Industry
Requires PHP: 7.4
Requires at least: 5.0
Tested up to: 6.8.2
Stable tag: 3.8.4
Stable tag: 3.8.5
License: MIT
WC requires at least: 3.9.0
WC tested up to: 10.2.1
WC tested up to: 10.2.2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A plugin that integrates your WooCommerce web shop to the AltaPay payments gateway.
Expand Down Expand Up @@ -39,6 +39,9 @@ AltaPay's Payment Gateway for WooCommerce provides merchants with access to a fu

== Changelog ==

= 3.8.5 =
* Support gateway form independent of the plugin/theme styling.

= 3.8.4 =
* Add support for Checkout Design v2.

Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sonar.projectKey=AltaPay_plugin-wordpress_d5aaa0f0-8a2d-473b-86fd-f0ef752035ce
sonar.coverage.exclusions=**
Loading