Skip to content

Commit 91e99b5

Browse files
committed
bug fixes
1 parent 510666a commit 91e99b5

File tree

5 files changed

+106
-8
lines changed

5 files changed

+106
-8
lines changed

.DS_Store

0 Bytes
Binary file not shown.

includes/class-paystack-forms-activator.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public static function activate() {
1414
paid int(1) NOT NULL DEFAULT '0',
1515
plan varchar(255) DEFAULT '' NOT NULL,
1616
txn_code varchar(255) DEFAULT '' NOT NULL,
17+
txn_code_2 varchar(255) DEFAULT '' NOT NULL,
1718
amount varchar(255) DEFAULT '' NOT NULL,
1819
ip varchar(255) NOT NULL,
1920
deleted_at varchar(255) DEFAULT '' NULL,
@@ -29,6 +30,12 @@ public static function activate() {
2930
if(empty($row)){
3031
$wpdb->query("ALTER TABLE `".$table_name."` ADD `plan` VARCHAR(255) NOT NULL AFTER `paid`;");
3132
}
33+
$row1 = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
34+
WHERE table_name = '".$table_name."' AND column_name = 'txn_code_2'" );
35+
36+
if(empty($row1)){
37+
$wpdb->query("ALTER TABLE `".$table_name."` ADD `txn_code_2` VARCHAR(255) DEFAULT '' NULL AFTER `txn_code`;");
38+
}
3239

3340
}
3441

includes/paystack-invoice.php

Lines changed: 76 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,84 @@
11
<?php
22
require_once('../../../../wp-load.php');
3-
get_header();
43

5-
$code = @$_GET['code'];
6-
echo $code;
4+
$code = @$_GET['code'];
5+
6+
$mode = esc_attr( get_option('mode') );
7+
if ($mode == 'test') {
8+
$key = esc_attr( get_option('tpk') );
9+
}else{
10+
$key = esc_attr( get_option('lpk') );
11+
}
712
?>
813

9-
<div>
14+
<?php
15+
/**
16+
* Template Name: Alphabetical Posts
17+
*/
18+
19+
get_header(); ?>
20+
<div class="content-area main-content" id="primary">
21+
<main role="main" class="site-main" id="main">
22+
<div class="blog_post">
23+
<article class="post-4 page type-page status-publish hentry" id="post-4">
24+
<form action="" method="" class="j-forms" id="pf-form" novalidate="">
25+
<div class="content">
1026

11-
your custom php code goes here
27+
<div class="divider-text gap-top-20 gap-bottom-45">
28+
<span>Input</span>
29+
</div>
1230

13-
</div>
31+
<div class="j-row">
32+
<div class="span12 unit">
33+
<label class="label">Text input without icon <span>*</span></label>
34+
<div class="input">
35+
<input type="text" placeholder="placeholder text...">
36+
</div>
37+
</div>
38+
<div class="span12 unit">
39+
<label class="label">Text input without icon</label>
40+
<label class="select">
41+
<select autocomplete="off">
42+
<option value="none">Select fruit</option>
43+
<option value="0">Apple</option>
44+
<option value="1">Banana</option>
45+
<option value="2">Coconut</option>
46+
<option value="3">Mango</option>
47+
<option value="4">Melon</option>
48+
<option value="5">Orange</option>
49+
<option value="6">Pear</option>
50+
<option value="7">Watermelon</option>
51+
</select>
52+
<i></i>
53+
</label>
54+
</div>
55+
<div class="span12 unit">
56+
<label class="input append-small-btn">
57+
<div class="file-button">
58+
Browse
59+
<input type="file" onchange="document.getElementById('append-small-btn').value = this.value;">
60+
</div>
61+
<input type="text" id="append-small-btn" readonly="" placeholder="no file selected">
62+
</label>
63+
</div>
64+
<div class="span12 unit">
65+
<label class="label">Textarea</label>
66+
<div class="input">
67+
<textarea placeholder="your message..." spellcheck="false" id="textarea"></textarea>
68+
</div>
69+
</div>
70+
</div>
71+
</div>
1472

15-
<?php get_footer(); ?>
73+
<div class="footer">
74+
<small><span style="color: red;">*</span> are compulsory</small><br>
75+
<img class="paystack-cardlogos size-full wp-image-1096" alt="cardlogos" src="http://localhost/wordpress/wp-content/plugins/paystack-forms/public/../images/[email protected]">
76+
<button type="submit" class="primary-btn">Submit</button>
77+
</div>
78+
</form>
79+
</article>
80+
</div>
81+
</main>
82+
</div>
83+
<?php
84+
get_footer();

public/class-paystack-forms-public.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function kkd_pff_paystack_mail_content_type() {
6767
return "text/html";
6868
}
6969
add_filter ("wp_mail_from_name", "kkd_pff_paystack_mail_from_name");
70-
function kkd_pff_paystack_email_from_name() {
70+
function kkd_pff_paystack_mail_from_name() {
7171
$name = get_option( 'blogname' );
7272
return $name;
7373
}
@@ -777,6 +777,7 @@ function kkd_pff_paystack_text_shortcode($atts) {
777777
'name' => 'Title',
778778
'required' => '0',
779779
), $atts));
780+
// pf-amount
780781
$code = '<div class="span12 unit">
781782
<label class="label">'.$name;
782783
if ($required == 'required') {

public/css/pff-paystack-style.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@
2424

2525
.wrapper-640 { max-width:640px; }
2626

27+
28+
#pf-form.j-forms {
29+
/*max-width:640px;*/
30+
/*margin-left:70px;*/
31+
background-color:#fff;
32+
-webkit-border-radius:3px;
33+
-moz-border-radius:3px;
34+
-o-border-radius:3px;
35+
border-radius:3px;
36+
-webkit-box-shadow:0 1px 1px rgba(0,0,0,.6);
37+
-moz-box-shadow:0 1px 1px rgba(0,0,0,.6);
38+
-o-box-shadow:0 1px 1px rgba(0,0,0,.6);
39+
box-shadow:0 1px 1px rgba(0,0,0,.6);
40+
-webkit-box-sizing:border-box;
41+
-moz-box-sizing:border-box;
42+
box-sizing:border-box;
43+
color:rgba(0,0,0,.54);
44+
font:16px 'Open Sans',Helvetica,Arial,sans-serif;
45+
line-height:1;
46+
position:relative;
47+
}
2748
.j-forms .input { position:relative; }
2849

2950
.j-forms .unit { position:relative; margin-bottom:25px; }

0 commit comments

Comments
 (0)