I'm having trouble setting up a cURL session. I know that the recent PHP changes disabled cURL by default, but I upgraded to version 2 PHP access today, and my account control panel shows that my current PHP access is Intermediate (version 2), and so I should be able to use the cURL functions. Do I have to wait for a while after the upgrade for cURL access to take effect or is there something else that I'm doing wrong?
I am on the absolut server engineman.exofire.net.
Thanks,
engineman
Here are the relevant parts of my code:
Code:
Fatal error: Call to undefined function curl_init() in /home/enginema/php_nvp_api/CallerService.php on line 45
Thanks,
engineman
Here are the relevant parts of my code:
Code:
<?php
/****************************************************
CallerService.php
This file uses the constants.php to get parameters needed
to make an API call and calls the server.if you want use your
own credentials, you have to change the constants.php
Called by TransactionDetails.php, ReviewOrder.php,
DoDirectPaymentReceipt.php and DoExpressCheckoutPayment.php.
****************************************************/
require_once 'constants.php';
$API_UserName=API_USERNAME;
$API_Password=API_PASSWORD;
$API_Signature=API_SIGNATURE;
$API_Endpoint =API_ENDPOINT;
11.11.0-RELEASE_16983=VERSION;
session_start();
/**
* hash_call: Function to perform the API call to PayPal using API signature
* @methodName is name of API method.
* @nvpStr is nvp string.
* returns an associtive array containing the response from the server.
*/
function hash_call($methodName,$nvpStr)
{
//declaring of global variables
global $API_Endpoint,11.11.0-RELEASE_16983,$API_UserName,$API_Password,$API_Signature,$nvp_Header;
//setting the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$API_Endpoint);
curl_setopt($ch, CURLOPT_VERBOSE, 1);