Skip to content

Commit

Permalink
Add payment method to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bosunolanrewaju committed Jul 5, 2017
1 parent 5bd6cc7 commit 430bf4a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/js/flw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var buildConfigObj = function( form ) {
custom_logo: flw_rave_options.logo,
custom_title: flw_rave_options.title,
customer_email: email,
payment_method: flw_rave_options.method,
PBFPubKey: flw_rave_options.pbkey,
txref: txref,
onclose: function() {
Expand Down
1 change: 1 addition & 0 deletions includes/rave-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function load_js_files() {
'currency' => $admin_settings->get_option_value( 'currency' ),
'desc' => $admin_settings->get_option_value( 'modal_desc' ),
'logo' => $admin_settings->get_option_value( 'modal_logo' ),
'method' => $admin_settings->get_option_value( 'method' ),
'pbkey' => $admin_settings->get_option_value( 'public_key' ),
'title' => $admin_settings->get_option_value( 'modal_title' ),
);
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- **Tags:** rave, payment form, payment gateway, bank account, credit card, debit card, nigeria, kenya, international, mastercard, visa
- **Requires at least:** 4.4
- **Tested up to:** 4.6
- **Stable tag:** 0.0.1
- **Stable tag:** 0.1.2
- **License:** [MIT](https://github.com/bosunolanrewaju/rave-payment-forms/blob/master/LICENSE)

Take donations and payments for services on your WordPress site using Rave.
Expand All @@ -18,7 +18,7 @@ Accept Credit card, Debit card and Bank account payment directly on your WordPre

#### Take donations and payments easily and directly on your site

Signup for an account [here](https://flutterwave.com)
Signup for an account [here](https://ravepay.co)

Rave is available in:

Expand Down
15 changes: 15 additions & 0 deletions views/admin-settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@
<p class="description">(Optional) default: FLW PAY</p>
</td>
</tr>
<!-- Method -->
<tr valign="top">
<th scope="row">
<label for="flw_rave_options[method]"><?php _e( 'Payment Method', 'rave-pay' ); ?></label>
</th>
<td class="forminp forminp-text">
<select class="regular-text code" name="flw_rave_options[method]">
<?php $method = esc_attr( $admin_settings->get_option_value( 'method' ) ); ?>
<option value="both" <?php selected( $method, 'both' ) ?>>Card and Account</option>
<option value="card" <?php selected( $method, 'card' ) ?>>Card Only</option>
<option value="account" <?php selected( $method, 'account' ) ?>>Account Only</option>
</select>
<p class="description">(Optional) default: Card and Account</p>
</td>
</tr>
<!-- Modal Description -->
<tr valign="top">
<th scope="row">
Expand Down

0 comments on commit 430bf4a

Please sign in to comment.