From 9004d144c047e9d05a77d42185a33f8a6c1f6192 Mon Sep 17 00:00:00 2001 From: Omonzejele Precious Date: Fri, 6 Jul 2018 00:16:47 +0100 Subject: [PATCH 1/3] added first,last name,phone --- includes/rave-shortcode.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/rave-shortcode.php b/includes/rave-shortcode.php index dec58a1..a656e64 100644 --- a/includes/rave-shortcode.php +++ b/includes/rave-shortcode.php @@ -55,6 +55,8 @@ public function pay_button_shortcode( $attr, $content="" ) { $btn_text = empty( $content ) ? $this->pay_button_text() : $content; $email = $this->use_current_user_email( $attr ) ? wp_get_current_user()->user_email : ''; + $fname = wp_get_current_user()->user_firstname; + $lname = wp_get_current_user()->user_lastname; if (!empty($this->get_logo_url($attr))) { $attr['logo'] = $this->get_logo_url($attr); } @@ -63,7 +65,10 @@ public function pay_button_shortcode( $attr, $content="" ) { $atts = shortcode_atts( array( 'amount' => '', 'custom_currency' => [], - 'email' => $email, + 'firstname' => $fname, + 'lastname' => $lname, + 'phone' => '', + 'email' => $email, 'country' => $admin_settings->get_option_value('country'), 'currency' => $admin_settings->get_option_value('currency') ), $attr ); From d7393b17e10cc7ee8443e266808f73bb57d39b6d Mon Sep 17 00:00:00 2001 From: Omonzejele Precious Date: Fri, 6 Jul 2018 00:16:58 +0100 Subject: [PATCH 2/3] added first ,last name,phone --- views/pay-now-form.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/views/pay-now-form.php b/views/pay-now-form.php index 9f162f3..8a70fd1 100644 --- a/views/pay-now-form.php +++ b/views/pay-now-form.php @@ -14,10 +14,20 @@
>
- + + +
+ + +
+ + +
+ + -
+
From 2944edcc0651d0a2f9ef79517ae6e2469a370f08 Mon Sep 17 00:00:00 2001 From: Omonzejele Precious Date: Fri, 6 Jul 2018 00:17:21 +0100 Subject: [PATCH 3/3] added, first,last name, phone to the data --- assets/js/flw.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/js/flw.js b/assets/js/flw.js index ba7196c..5f710ac 100644 --- a/assets/js/flw.js +++ b/assets/js/flw.js @@ -25,6 +25,10 @@ var buildConfigObj = function( form ) { var email = formData.email || jQuery(form).find('#flw-customer-email').val(); var formCurrency = formData.currency || jQuery(form).find('#flw-currency').val(); var txref = 'WP_' + form.id.toUpperCase() + '_' + new Date().valueOf(); + //WHERE was added + var phonenumber = formData.phone || jQuery(form).find('#flw-customer-phone').val(); + var firstname = formData.firstname || jQuery(form).find('#flw-customer-firstname').val(); + var lastname = formData.lastname || jQuery(form).find('#flw-customer-lastname').val(); if (formCurrency == '') { formCurrency = flw_rave_options.currency; @@ -38,6 +42,9 @@ var buildConfigObj = function( form ) { custom_logo: flw_rave_options.logo, custom_title: flw_rave_options.title, customer_email: email, + customer_phone: phonenumber, + customer_firstname: firstname, + customer_lastname: lastname, payment_method: flw_rave_options.method, PBFPubKey: flw_rave_options.pbkey, txref: txref,