I am trying to integrate authourize.net payment gateway in php using sdk on github from https://github.com/AuthorizeNet/sdk-php link. i have downloaded the sdk in my root folder and updated composer as well
but still am getting following error
D:\xammp\htdocs\JustFaster>php D:\xammp\htdocs\Faster\charge-credit-card.php
Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in D:\xammp\htdocs\Faster\charge-credit-card.php on line 3
Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.;D:\xammp\php\PEAR') in D:\xammp\htdocs\Faster\charge-credit-card.php on line 3
I have tried to change the required files path starting from my root folder but still the problem is not resolved.
require 'vendor/autoload.php'; --- in sdk
i have changed it to --- require 'sdk-php-1.8.8/autoload.php';
sdk-php-1.8.8 is the sdk downloaded from github.
Please somebody help me with this.
Thanks in advance.
At the same time please can i get the sample code to create ARB subscription and get the status of that subscription with getSubscriptionStatus($subscriptionId) method.
Awaiting for a response..
Related
I have an activity plugin that requires another plugin to work correctly.
I followed the recommendation of requesting this plugin as a dependency in the version.php file like this :
$plugin->dependencies = array('local_aws' => 2017071501 ); //AWS php SDK dependency
The problem is when I install my plugin I receive a Warning :
Warning:
require_once(/var/www/moodle/local/aws/sdk/aws-autoloader.php): failed
to open stream: No such file or directory in
/var/www/moodle/mod/tutorship/lib.php on line 37
Fatal error: require_once(): Failed opening required
'/var/www/moodle/local/aws/sdk/aws-autoloader.php'
(include_path='/var/www/moodle/lib/pear:.:/usr/share/php') in
/var/www/moodle/mod/mymodulep/lib.php on line 37
Line 37 uses this code:
// For AWS API Part
require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');
So it seems to me during the install of my plugin the require_ once is not being satisfied as the AWS plugin has yet to be installed. Well I followed the recommendation of making it a dependency in version.php but it isn't being installed before the require_ once is checked ?
How can I resolve this conundrum ?
I think you are right in your supposition that "require_ once is not being satisfied as the AWS plugin has yet to be installed". To avoid this kind of problem, you should try to avoid to require files of other plugins/libraries in lines that are actually executed during the plugin installation/upgrading procedures. Is it necessary to use the other plugin during the installation of yours?
I would move the require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php'); to some file that is never run during the actual installation/upgrading (avoid the header of lib.php). For example, I would create a class mod/tutorship/classes/some_class.php (properly "namespaced" with namespace mod_tutorship;), do the require_once there and then just instantiate the class in my lib.php within the function that actually needs it.
I am having trouble doing the quickstart.php using the Composer dependency manager.
I have used Composer in order to require the Google Calendar API. autoload.php is present in the vendor folder. And I am just running the code from this page: https://developers.google.com/google-apps/calendar/quickstart/php
The error I am getting is
Fatal error: Uncaught Error: Class 'Google_Service_Calendar'
on quickstart.php line 12.
Does anyone know how I can fix this?
I've tried using: composer dump-autoload which has done nothing to remedy this.
Thanks!
Note: Beginner to php and programming on web databases.
I am trying to implement the Tesco API on the 000webhost webhosting site. I've copied the PHP script at the Tesco labs page, put it in the database at 000webhost where I call it with the index.php script, however when I tried to implement the code, it gives me this error:
Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3
Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3
From the error message, the culprit is this line in the Tescolab API script:
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://dev.tescolabs.com/product/');
Which seems to give an error because of some missing pear installation (don't really understand this)
It seems impossible to install this pear thing on 000webhost, and I've tried searching for workarounds for the HTTP_Request2, such as by using curl, but I can't seem to find a working solution. I also couldn't understand what the comment in the Tesco API meant:
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
If someone could propose a solution to this issue, either with a curl workaround, or by managing to install the pear thing
I'm checking on Evolution Script 5.1 PTC Script and when I activated the BitCoin Payment Gateway and try to add some funds in it, I get this error:
Warning: file_get_contents failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/u991806379/public_html/Sources/blockchain.php on line 40
Can anyone help me sort it out?
You are using custom theme, where is missing blockchain.tpl file. Go to default theme and copy blockchain.tpl to your current theme. Will start working.
I am currently developing a site with codeigniter that uses paypal standard payments. When a payment is made paypal sends the information back to the site using an IPN notification and returns the user to the site along with the info as a PDT. I use both because I am giving digital downloads.
Both PDT and IPN verify that the information they have been sent really came from paypal by sending it back to paypal. If paypal recognises that it is a real transaction it returns verified.
Things all work fine in the sandbox but now that I have switched paypal to live it has stopped working. I have check for all the usual culprits, such as still pointing to the sandbox.
When paypal forwards me back to the success page on my site. I see the following error, the IPN also fails with an INVALID response.
PHP Warning: require(../system/libraries/Exceptions.php) [function.require]: failed to open stream: No such file or directory in C:\Domains\mydomain.com\system\codeigniter\Common.php on line 116
PHP Warning: require(../system/libraries/Exceptions.php) [function.require]: failed to open stream: No such file or directory in C:\Domains\ mydomain.com\system\codeigniter\Common.php on line 116
PHP Fatal error: require() [function.require]: Failed opening required ‘../system/libraries/Exceptions.php’ (include_path=’.;C:\PHP5\pear’) in C:\Domains\mydomain.com\system\codeigniter\Common.php on line 116
The strange thing is that when I refresh the page I don’t get the error and the PDT information is verified and displayed as expected. I see the same error even with a die() statement on the first line of code in my success controller function, when refreshed the die() output is shown instead of the error.
I am using $config[‘uri_protocol’] = “PATH_INFO”; $config[‘enable_query_strings’] = TRUE;
as suggested here to allow query strings and segments.
http://codeigniter.com/forums/viewthread/99570/
I am using IIS and Pear appears to be installed.
I have the application folder at the same level as the system folder.
Does anybody have any ideas why this is happening.
Any help or insights would be much appreciated.
Thanks
Does changing the value of $config[‘uri_protocol’] to REQUEST_URI help?