dhs / wp-gocardless Goto Github PK
View Code? Open in Web Editor NEWWordpress plugin for GoCardless
Home Page: http://wordpress.org/extend/plugins/gocardless-wordpress-plugin/
Wordpress plugin for GoCardless
Home Page: http://wordpress.org/extend/plugins/gocardless-wordpress-plugin/
If API details are incorrect an exception is thrown (GoCardless_ApiException), and the user is unable to change the settings without manually going into the database.
Proposed solution:
try {
// Initialize library
GoCardless::set_account_details(array(
'app_id' => $gocardless_config['app_id'],
'app_secret' => $gocardless_config['app_secret'],
'merchant_id' => $gocardless_config['merchant_id'],
'access_token' => $gocardless_config['access_token'],
'ua_tag' => 'gocardless-wp/v' . GC_WP_VERSION
));
} catch (GoCardless_ApiException $e) {
echo 'API details are incorrect, please check and try again (see error below)';
echo $e->getMessage();
}
However this solution still doesn't catch the exception, maybe something in the GoCardless library handling exceptions? I'm not too sure as I'm not too familiar with exceptions.
I get this error even before entering gocardless details
Fatal error: Uncaught exception 'GoCardless_ApiException' with message 'Unknown error' in C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\lib\GoCardless\Request.php:177 Stack trace: #0 C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\lib\GoCardless\Request.php(24): GoCardless_Request::call('get', 'https://gocardl...', Array) #1 [internal function]: GoCardless_Request::get('https://gocardl...', Array) #2 C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\lib\GoCardless\Client.php(452): call_user_func('GoCardless_Requ...', 'https://gocardl...', Array) #3 C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\lib\GoCardless\Merchant.php(54): GoCardless_Client->request('get', '/merchants/') #4 C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\admin.php(50): GoCardless_Merchant::find('') #5 C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\admin.php(30): gocardless_admin_dashb in C:\xampp\htdocs\builders\scc\wp-content\plugins\gocardless-wordpress-plugin\lib\GoCardless\Request.php on line 177
The order that subscriptions appear in appears to be arbitrary. They should be sorted by date_created.
After entering my Sandbox API info etc, I get a blank white page when visiting Plugins > GoCardless.
The only thing there is this text:
This plugin allows you to create a link within Wordpress that lets users pay a subscription.
API queries shouldn't be chained for each subscription object. Instead all subscriptions, bills and users should be fetched independently and matched up afterwards.
See under 'Subscriptions' here: https://gocardless.com/docs/connect_guide
Using single quotes in the name or description field results in slashes appearing on posts/pages when using the shortcode.
GoCardless API keys and payment data could each be serialized and stored as one value in WP Options each.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.