Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wooc 1608 #991

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions payplug-config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* The base configuration for payplug payment gateways
*
* This file contains the following configurations:
* * required CDN path
* @package payplug
*/

/**
* CDN path to integrated-payment lib
*/
define( 'IP_API', 'https://cdn-qa.payplug.com/js/integrated-payment/v1@1/index.js' );
5 changes: 5 additions & 0 deletions payplug.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ function init() {
if ( file_exists( plugin_dir_path( __FILE__ ) . '/vendor/autoload.php' ) ) {
require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
}

if ( file_exists( plugin_dir_path( __FILE__ ) . DIRECTORY_SEPARATOR . 'payplug-config.php' ) ) {
require_once plugin_dir_path( __FILE__ ) . DIRECTORY_SEPARATOR . 'payplug-config.php';
}

PayplugWoocommerceHelper::load_plugin_textdomain( plugin_basename( dirname( __FILE__ ) ) . '/languages' );
PayplugWoocommerce::get_instance();

Expand Down
2 changes: 1 addition & 1 deletion src/Gateway/Blocks/PayplugCreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function ip_scripts(){
wp_enqueue_style('payplugIP', PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/css/payplug-integrated-payments.css', [], PAYPLUG_GATEWAY_VERSION);
wp_register_script(
'payplug-integrated-payments-api',
'https://cdn-qa.payplug.com/js/integrated-payment/v1@1/index.js',
IP_API,
array(),
'v1.1',
true
Expand Down
3 changes: 1 addition & 2 deletions src/Gateway/PayplugCreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public function integrated_payments_scripts(){

wp_register_script('payplug-domain', PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/js/payplug-domain.js', [], 'v1.0');
wp_enqueue_script('payplug-domain');

wp_register_script('payplug-integrated-payments-api', 'https://cdn-qa.payplug.com/js/integrated-payment/v1@1/index.js', [], 'v1.1', true);
wp_register_script('payplug-integrated-payments-api', IP_API, [], 'v1.1', true);
wp_enqueue_script('payplug-integrated-payments-api');

wp_register_script( 'jquery-bind-first', PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/js/jquery.bind-first-0.2.3.min.js', array( 'jquery' ), '1.0.0', true );
Expand Down
Loading