I'm using curlpp to communicate with paypal.  I'm having an issue
where when the perform() function is called my cgi dies.  No error,
nothing.

I'm really under the gun here.  Any help would be greatly appreciated.

Here's what I'm doing:

//Using credit card number and time in seconds to create unique id
                char uniqueID[64];
                strcpy(uniqueID, creditCardNumber);
                sprintf(uniqueID, "%s%ld", uniqueID, time(NULL));

                //set the headers.
                std::list<std::string> headers;
                headers.push_back("Content-Type: text/namevalue");
                headers.push_back("Content-Length: " +
verisignArgs.GetLength());
                headers.push_back("X-VPS-Timeout: 45");
                headers.push_back("X-VPS-Request_ID:" + std::string
(uniqueID));

                cURLpp::Cleanup myCleanup;
                cURLpp::Easy myRequest;
                myRequest.setOpt(new cURLpp::Options::Url
(kVerisignHost));
                myRequest.setOpt(new cURLpp::Options::Port
(kVerisignPort));
                myRequest.setOpt(new cURLpp::Options::Timeout
(kVerisignTimeout));
                myRequest.setOpt(new cURLpp::Options::Header(1));
                myRequest.setOpt(new cURLpp::Options::FollowLocation
(0));
                myRequest.setOpt(new cURLpp::Options::SslVerifyPeer
(0));
                myRequest.setOpt(new cURLpp::Options::SslVerifyHost
(2));
                myRequest.setOpt(new cURLpp::Options::ForbidReuse
(true));
                myRequest.setOpt(new cURLpp::Options::Post(1));
                myRequest.setOpt(new cURLpp::Options::HttpHeader
(headers));
                myRequest.setOpt(new cURLpp::Options::PostFields
(std::string(verisignArgs)));
                myRequest.setOpt(new cURLpp::Options::UserAgent
("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/
20070725 Firefox/2.0.0.6"));

                std::ostringstream responseBuffer;

                cURLpp::Options::WriteStream ws(&responseBuffer);
                myRequest.setOpt(ws);

                myRequest.perform();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"curlpp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/curlpp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to