-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e4faa86
Showing
25 changed files
with
2,112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor | ||
composer.lock |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
=== Pesepay === | ||
Contributors: pesepay | ||
Donate link: https://pesepay.com | ||
Tags: pesepay, payment, woocommerce, zimbabwe, gateway | ||
Requires at least: 4.0.0 | ||
Tested up to: 5.9 | ||
Requires PHP: 7.1 | ||
Stable tag: 1.2.4 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Pesepay helps businesses in Africa get paid by anyone, anywhere in the world | ||
|
||
== Description == | ||
|
||
The Pesepay extension helps merchants to collect payments via the Pesepay payment gateway without any line of code. | ||
Our developers have done everything for you. You only need integration and encryption keys and you are good to collect payments. Sign up on [Pesepay](https://dashboard.pesepay.com/#/auth/register) and get the keys. | ||
|
||
== Installation == | ||
|
||
= Automatic installation = | ||
|
||
Automatic installation is the easiest option -- WordPress will handle the file transfer, and you won’t need to leave your web browser. To do an automatic install of Pesepay, log in to your WordPress dashboard, navigate to the Plugins menu, and click “Add New.” | ||
|
||
In the search field type “Pesepay”, then click “Search Plugins.” Once you’ve found us, you can view details about it such as the point release, rating, and description. Most importantly of course, you can install it by! Clicking “Install Now,” and WordPress will take it from there. | ||
|
||
= Manual installation = | ||
|
||
1. Upload `/Pesepay/` to the `/wp-content/plugins/` directory | ||
2. Activate the plugin through the 'Plugins' menu in WordPress | ||
|
||
== Frequently Asked Questions == | ||
|
||
= What is Pesepay? = | ||
|
||
Pesepay is a payments processing website. We handle different transactions for a variety of reasons. From donation campaigns, to online merchants, to events, Pesepay is a great platform to start accepting payments online. | ||
|
||
= How do I sign up? = | ||
|
||
If you are signing up for your own business, you simply need to click on the Sign Up button on https://pesepay.com. Enter the required details to start the sign-up process. Please note, applications are found after logging in to your account with your company, not on the home page of the Pesepay website | ||
|
||
== Screenshots == | ||
1. Checkout Page. | ||
2. Plugin Setup Page. | ||
|
||
== Changelog == | ||
|
||
= 1.2.4 = | ||
* Reimplementation of plugin. | ||
|
||
= 1.0.0 = | ||
* Initial Release. | ||
|
||
== Upgrade Notice == | ||
|
||
= 1.2.4 = | ||
* Reimplementation of plugin. | ||
|
||
= 1.0.0 = | ||
* Initial Release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?php | ||
|
||
/** | ||
* The admin-specific functionality of the plugin. | ||
* | ||
* @link https://pesepay.com | ||
* @since 1.0.0 | ||
* | ||
* @package Pesepay | ||
* @subpackage Pesepay/admin | ||
*/ | ||
|
||
/** | ||
* The admin-specific functionality of the plugin. | ||
* | ||
* Defines the plugin name, version, and two examples hooks for how to | ||
* enqueue the admin-specific stylesheet and JavaScript. | ||
* | ||
* @package Pesepay | ||
* @subpackage Pesepay/admin | ||
* @author Pesepay <[email protected]> | ||
*/ | ||
class Pesepay_Admin | ||
{ | ||
|
||
/** | ||
* The ID of this plugin. | ||
* | ||
* @since 1.0.0 | ||
* @access private | ||
* @var string $plugin_name The ID of this plugin. | ||
*/ | ||
private $plugin_name; | ||
|
||
/** | ||
* The version of this plugin. | ||
* | ||
* @since 1.0.0 | ||
* @access private | ||
* @var string $version The current version of this plugin. | ||
*/ | ||
private $version; | ||
|
||
/** | ||
* Initialize the class and set its properties. | ||
* | ||
* @since 1.0.0 | ||
* @param string $plugin_name The name of this plugin. | ||
* @param string $version The version of this plugin. | ||
*/ | ||
public function __construct($plugin_name, $version) | ||
{ | ||
|
||
$this->plugin_name = $plugin_name; | ||
$this->version = $version; | ||
} | ||
|
||
/** | ||
* Check if we should show notice that open ssl is required | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @return void | ||
*/ | ||
public function admin_notices() | ||
{ | ||
if (!function_exists("openssl_encrypt")) { | ||
include plugin_dir_path(__FILE__) . "partials/pesepay-admin-display.php"; | ||
} | ||
} | ||
|
||
/** | ||
* Load custom payment gateway class | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @return void | ||
*/ | ||
public function woocommerce_init() | ||
{ | ||
include plugin_dir_path(__DIR__) . "includes/classes/class-pesepay-gateway.php"; | ||
} | ||
|
||
/** | ||
* Load our custom payment gateway class | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @param array $gateways | ||
* @return array | ||
*/ | ||
function woocommerce_payment_gateways($methods) | ||
{ | ||
|
||
$methods[] = 'WC_Pesepay_Gateway'; | ||
return $methods; | ||
} | ||
|
||
/** | ||
* Add quick link to plugin settings page | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @param array $links | ||
* @return array | ||
*/ | ||
public function plugin_links($links) | ||
{ | ||
$links[] = '<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout§ion=' . PesePay_Helper::get_gateway_id()) . '">' . __("Settings", $this->plugin_name) . '</a>'; | ||
return $links; | ||
} | ||
|
||
/** | ||
* Add ZWL currency if not already added | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @param array|string $currencies | ||
* @return array|string | ||
*/ | ||
public function woocommerce_currencies($currencies) | ||
{ | ||
|
||
if (!isset($currencies["ZWL"])) { | ||
$_currencies = PesePay_Helper::get_supported_currencies(); | ||
|
||
foreach ($_currencies as $_currency) { | ||
if (!isset($currencies[$_currency["code"]])) { | ||
$currencies[$_currency["code"]] = $_currency["name"]; | ||
} | ||
} | ||
} | ||
|
||
return $currencies; | ||
} | ||
|
||
/** | ||
* Set currency symbol if not already setup | ||
* | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
* @param string $symbol | ||
* @param string $currency | ||
* @return string | ||
*/ | ||
public function woocommerce_currency_symbol($symbol, $currency) | ||
{ | ||
|
||
if (strlen($symbol) == 0) { | ||
switch ($currency) { | ||
case 'ZWL': | ||
$symbol = 'ZWL'; | ||
break; | ||
} | ||
} | ||
|
||
return $symbol; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php // Silence is golden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/** | ||
* Provide a admin area view for the plugin | ||
* | ||
* This file is used to markup the admin-facing aspects of the plugin. | ||
* | ||
* @link https://pesepay.com | ||
* @since 1.0.0 | ||
* | ||
* @package Pesepay | ||
* @subpackage Pesepay/admin/partials | ||
*/ | ||
?> | ||
|
||
<div class="notice notice-warn is-dismissible"> | ||
<p><?php _e('The open ssl extension is required in order for Pesepay to work correctly, please install or enable it!', $this->plugin_name); ?> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "pesepay/pesepay", | ||
"description": "Robust & Secure online payments solution for Africa", | ||
"type": "plugin", | ||
"license": "GPLv2", | ||
"authors": [ | ||
{ | ||
"name": "Pesepay", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"config": { | ||
"platform": { | ||
"php": "7.1" | ||
} | ||
}, | ||
"require": { | ||
"ext-json": "*", | ||
"symfony/polyfill-php54": "*", | ||
"symfony/polyfill-php55": "*", | ||
"symfony/polyfill-php56": "*", | ||
"symfony/polyfill-php70": "*", | ||
"symfony/polyfill-php71": "*", | ||
"symfony/polyfill-php72": "*", | ||
"symfony/polyfill-php73": "*", | ||
"symfony/polyfill-php74": "*", | ||
"symfony/polyfill-php80": "*", | ||
"symfony/polyfill-php81": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* Fired during plugin activation | ||
* | ||
* @link https://pesepay.com | ||
* @since 1.0.0 | ||
* | ||
* @package Pesepay | ||
* @subpackage Pesepay/includes | ||
*/ | ||
|
||
/** | ||
* Fired during plugin activation. | ||
* | ||
* This class defines all code necessary to run during the plugin's activation. | ||
* | ||
* @since 1.0.0 | ||
* @package Pesepay | ||
* @subpackage Pesepay/includes | ||
* @author Pesepay <[email protected]> | ||
*/ | ||
class Pesepay_Activator | ||
{ | ||
|
||
/** | ||
* Short Description. (use period) | ||
* | ||
* Long Description. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static function activate() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* Fired during plugin deactivation | ||
* | ||
* @link https://pesepay.com | ||
* @since 1.0.0 | ||
* | ||
* @package Pesepay | ||
* @subpackage Pesepay/includes | ||
*/ | ||
|
||
/** | ||
* Fired during plugin deactivation. | ||
* | ||
* This class defines all code necessary to run during the plugin's deactivation. | ||
* | ||
* @since 1.0.0 | ||
* @package Pesepay | ||
* @subpackage Pesepay/includes | ||
* @author Pesepay <[email protected]> | ||
*/ | ||
class Pesepay_Deactivator | ||
{ | ||
|
||
/** | ||
* Short Description. (use period) | ||
* | ||
* Long Description. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static function deactivate() | ||
{ | ||
} | ||
} |
Oops, something went wrong.