Skip to content

Commit 513b557

Browse files
authored
Merge pull request #52 from PaystackHQ/improve/add-namespace
Namespace variable name to avoid conflicts
2 parents a73bdce + 0a2dbe1 commit 513b557

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

README.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://paystack.com/demo
44
Tags: paystack, recurrent payments, nigeria, mastercard, visa, target, Naira, payments, verve, donation, church, NGO, form, contact form 7, form
55
Requires at least: 3.1
66
Tested up to: 5.0
7-
Stable tag: 3.3.0
7+
Stable tag: 3.3.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -94,9 +94,9 @@ Yes you can! Join in on our [GitHub repository](https://github.com/PaystackHQ/wo
9494
== Changelog ==
9595
= 3.3.0 =
9696
* Major fixes to convenience fee option!
97-
* - Now know as 'Additional Charge' to clarify it does not _always_ pass transaction fees
98-
* - Now properly pass fee settings to both the frontend and backend
99-
* - Now properly considers fee when it comes to quantified payments
97+
* Now known as 'Additional Charge' to clarify it does not _always_ pass transaction fees
98+
* Now properly pass fee settings to both the frontend and backend
99+
* Now properly considers fee when it comes to quantified payments
100100
= 3.2.1 =
101101
* Fixes an issue where leading zeroes were stripped
102102
= 3.2.0 =

paystack-forms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Payment Forms for Paystack
44
Plugin URI: https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack
55
Description: Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack.
6-
Version: 3.3.0
6+
Version: 3.3.1
77
Author: Paystack
88
Author URI: http://paystack.com
99
License: GPL-2.0+

public/class-paystack-forms-public-for-old-themes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function enqueue_scripts()
4949
wp_register_script('Paystack', 'https://js.paystack.co/v1/inline.js', false, '1');
5050
wp_enqueue_script('Paystack');
5151
wp_enqueue_script('paystack_frontend', plugin_dir_url(__FILE__) . 'js/paystack-forms-public.js', false, $this->version);
52-
wp_localize_script('paystack_frontend', 'settings', array('key'=> Kkd_Pff_Paystack_Public::fetchPublicKey(), 'fee'=>Kkd_Pff_Paystack_Public::fetchFeeSettings()), $this->version, true, true);
52+
wp_localize_script('paystack_frontend', 'kkd_pff_settings', array('key'=> Kkd_Pff_Paystack_Public::fetchPublicKey(), 'fee'=>Kkd_Pff_Paystack_Public::fetchFeeSettings()), $this->version, true, true);
5353
}
5454
}
5555

public/class-paystack-forms-public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function enqueue_scripts()
4848
wp_register_script('Paystack', 'https://js.paystack.co/v1/inline.js', false, '1');
4949
wp_enqueue_script('Paystack');
5050
wp_enqueue_script('paystack_frontend', plugin_dir_url(__FILE__) . 'js/paystack-forms-public.js', array( 'jquery' ), $this->version, true, true);
51-
wp_localize_script('paystack_frontend', 'settings', array('key'=> Kkd_Pff_Paystack_Public::fetchPublicKey(), 'fee'=>Kkd_Pff_Paystack_Public::fetchFeeSettings()), $this->version, true, true);
51+
wp_localize_script('paystack_frontend', 'kkd_pff_settings', array('key'=> Kkd_Pff_Paystack_Public::fetchPublicKey(), 'fee'=>Kkd_Pff_Paystack_Public::fetchFeeSettings()), $this->version, true, true);
5252
}
5353
}
5454

public/js/paystack-forms-public.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ function KkdPffPaystackFee() {
212212
} else {
213213
var obj = new KkdPffPaystackFee();
214214

215-
obj.withAdditionalCharge(settings.fee.adc);
216-
obj.withThreshold(settings.fee.ths);
217-
obj.withCap(settings.fee.cap);
218-
obj.withPercentage(settings.fee.prc);
215+
obj.withAdditionalCharge(kkd_pff_settings.fee.adc);
216+
obj.withThreshold(kkd_pff_settings.fee.ths);
217+
obj.withCap(kkd_pff_settings.fee.cap);
218+
obj.withPercentage(kkd_pff_settings.fee.prc);
219219
if(quant){
220220
transaction_amount = transaction_amount * quant;
221221
}
@@ -381,7 +381,7 @@ function KkdPffPaystackFee() {
381381
if (data.plan == "none" || data.plan == "" || data.plan == "no") {
382382
var handler = PaystackPop.setup(
383383
{
384-
key: settings.key,
384+
key: kkd_pff_settings.key,
385385
email: data.email,
386386
amount: data.total,
387387
firstname: firstName,
@@ -451,7 +451,7 @@ function KkdPffPaystackFee() {
451451
} else {
452452
var handler = PaystackPop.setup(
453453
{
454-
key: settings.key,
454+
key: kkd_pff_settings.key,
455455
email: data.email,
456456
plan: data.plan,
457457
firstname: firstName,
@@ -560,7 +560,7 @@ function KkdPffPaystackFee() {
560560
if (data.plan == "none" || data.plan == "" || data.plan == "no") {
561561
var handler = PaystackPop.setup(
562562
{
563-
key: settings.key,
563+
key: kkd_pff_settings.key,
564564
email: data.email,
565565
amount: data.total,
566566
firstname: firstName,
@@ -630,7 +630,7 @@ function KkdPffPaystackFee() {
630630
} else {
631631
var handler = PaystackPop.setup(
632632
{
633-
key: settings.key,
633+
key: kkd_pff_settings.key,
634634
email: data.email,
635635
plan: data.plan,
636636
firstname: firstName,

0 commit comments

Comments
 (0)