Skip to content
Permalink
Browse files

Added gitattributes, cleaned README, fail if not NGN

  • Loading branch information...
ibrahimlawal committed May 5, 2016
1 parent 92462c7 commit a7453f87e93c873c017a75b4d2c9e2d67b86e401
Showing with 21 additions and 7 deletions.
  1. +15 −0 .gitattributes
  2. +2 −7 README.md
  3. +4 −0 modules/gateways/paystack.php
@@ -0,0 +1,15 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".

/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/test export-ignore
/CHANGELOG.md export-ignore
/README.md export-ignore
/LICENSE export-ignore
@@ -9,21 +9,17 @@ A plugin that allows WHMCS users accept payments using Paystack
- PHP (5.5.19 or more recent) and extensions, MySQL and web browser
- cURL (7.34.0 or more recent)
- OpenSSL v1.0.1 or more recent
- For further details of PHP compatibility, MySQL, supported Web servers and other
requirements,refer to the WHMCS website:[Magento Requirements][link-magento-requirements]

## Prepare

- Before you can start taking payments through Paystack, you will first need to sign up at:
[https://dashboard.paystack.co/#/signup][link-signup]. To receive live payments, you should request a Go-live after
you are done with configuration and have successfully made a test payment.
- Either: Download a release version from the [releases page][link-releases]
- OR: Locate this plugin on [Magento Connect][link-magento-connect] and copy the extension key.

## Install
1. Copy [paystack.php](modules/gateways/paystack.php) in [modules/gateways](modules/gateways) to the /modules/gateways/ folder of your WHMCS installation.
1. Copy [paystack.php](modules/gateways/paystack.php) in [modules/gateways](modules/gateways) to the `/modules/gateways/` folder of your WHMCS installation.

2. Copy [paystack.php](modules/gateways/callback/paystack.php) in [modules/gateways/callback](modules/gateways/callback) to the /modules/gateways/callback folder of your WHMCS installation.
2. Copy [paystack.php](modules/gateways/callback/paystack.php) in [modules/gateways/callback](modules/gateways/callback) to the `/modules/gateways/callback` folder of your WHMCS installation.

## I'm ready!

@@ -47,7 +43,6 @@ If you discover any security related issues, please email `support@paystack.com`

## Credits

- [Paystack Support][link-author]
- [Ibrahim Lawal][link-author2]
- [All Contributors][link-contributors]

@@ -81,6 +81,10 @@ function paystack_link($params)
$invoiceId = $params['invoiceid'];
$amountinkobo = intval(floatval($params['amount'])*100);
$currency = $params['currency'];
if(!(strtoupper($currency) == 'NGN')){
die("Paystack only accepts NGN payments for now");
}
// Client
$email = $params['clientdetails']['email'];

0 comments on commit a7453f8

Please sign in to comment.
You can’t perform that action at this time.