Daily Archives

Articles indexed Sunday April 11 2010

Page 3/79 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Need to capture and store receiver's details via IPN by using Paypal Mass Pay API

    - by Devner
    Hi all, This is a question about Paypal Mass Pay IPN. My platform is PHP & mySQL. All over the Paypal support website, I have found IPN for only payments made. I need an IPN on similar lines for Mass Pay but could not find it. Also tried experimenting with already existing Mass Pay NVP code, but that did not work either. What I am trying to do is that for all the recipients to whom the payment has been successfully sent via Mass Pay, I want to record their email, amount and unique_id in my own database table. If possible, I want to capture the payment status as well, whether it has been a success of failure and based upon the same, I need to do some in house processing. The existing code Mass pay code is below: <?php $environment = 'sandbox'; // or 'beta-sandbox' or 'live' /** * Send HTTP POST Request * * @param string The API method name * @param string The POST Message fields in &name=value pair format * @return array Parsed HTTP Response body */ function PPHttpPost($methodName_, $nvpStr_) { global $environment; // Set up your API credentials, PayPal end point, and API version. $API_UserName = urlencode('my_api_username'); $API_Password = urlencode('my_api_password'); $API_Signature = urlencode('my_api_signature'); $API_Endpoint = "https://api-3t.paypal.com/nvp"; if("sandbox" === $environment || "beta-sandbox" === $environment) { $API_Endpoint = "https://api-3t.$environment.paypal.com/nvp"; } $version = urlencode('51.0'); // Set the curl parameters. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $API_Endpoint); curl_setopt($ch, CURLOPT_VERBOSE, 1); // Turn off the server and peer verification (TrustManager Concept). curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); // Set the API operation, version, and API signature in the request. $nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_"; // Set the request as a POST FIELD for curl. curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq); // Get response from the server. $httpResponse = curl_exec($ch); if(!$httpResponse) { exit("$methodName_ failed: ".curl_error($ch).'('.curl_errno($ch).')'); } // Extract the response details. $httpResponseAr = explode("&", $httpResponse); $httpParsedResponseAr = array(); foreach ($httpResponseAr as $i => $value) { $tmpAr = explode("=", $value); if(sizeof($tmpAr) > 1) { $httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1]; } } if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) { exit("Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint."); } return $httpParsedResponseAr; } // Set request-specific fields. $emailSubject =urlencode('example_email_subject'); $receiverType = urlencode('EmailAddress'); $currency = urlencode('USD'); // or other currency ('GBP', 'EUR', 'JPY', 'CAD', 'AUD') // Add request-specific fields to the request string. $nvpStr="&EMAILSUBJECT=$emailSubject&RECEIVERTYPE=$receiverType&CURRENCYCODE=$currency"; $receiversArray = array(); for($i = 0; $i < 3; $i++) { $receiverData = array( 'receiverEmail' => "[email protected]", 'amount' => "example_amount", 'uniqueID' => "example_unique_id", 'note' => "example_note"); $receiversArray[$i] = $receiverData; } foreach($receiversArray as $i => $receiverData) { $receiverEmail = urlencode($receiverData['receiverEmail']); $amount = urlencode($receiverData['amount']); $uniqueID = urlencode($receiverData['uniqueID']); $note = urlencode($receiverData['note']); $nvpStr .= "&L_EMAIL$i=$receiverEmail&L_Amt$i=$amount&L_UNIQUEID$i=$uniqueID&L_NOTE$i=$note"; } // Execute the API operation; see the PPHttpPost function above. $httpParsedResponseAr = PPHttpPost('MassPay', $nvpStr); if("SUCCESS" == strtoupper($httpParsedResponseAr["ACK"]) || "SUCCESSWITHWARNING" == strtoupper($httpParsedResponseAr["ACK"])) { exit('MassPay Completed Successfully: '.print_r($httpParsedResponseAr, true)); } else { exit('MassPay failed: ' . print_r($httpParsedResponseAr, true)); } ?> In the code above, how and where do I add code to capture the fields that I requested above? Any code indicating the solution is highly appreciated. Thank you very much.

    Read the article

  • Tomcat with virtual hosts - 404

    - by Thardas
    I have a CentOS 5.2 server set up with Apache 2.2.3 and Tomcat 5.5.27. The server hosts multiple virtual hosts connected to multiple Tomcats. For instance we have one tomcat for development and testing and one tomcat for production. project.demo.us.com points to dev tomcat and project.us.com points to production tomcat. Here's the virtual host's configuration: <VirtualHost *:80> ServerName project.demo.us.com CustomLog logs/project.demo.us.com/access_log combined env=!VLOG ErrorLog logs/project.demo.us.com/error_log DocumentRoot /var/www/vhosts/project.demo.us.com <Directory /var/www/vhosts/project.demo.us.com> Allow from all AllowOverride All Options -Indexes FollowSymLinks </Directory> ########## ########## ########## JkMount /project/* online </VirtualHost> JkMount line defines that we use online worker and our workers.properties contains this: worker.list=..., online, ... worker.online.port=7703 worker.online.host=localhost worker.online.type=ajp13 worker.online.lbfactor=1 And tomcat's conf/server.xml contains: <Connector port="7703" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="UTF-8" maxThreads="80" minSpareThreads="10" maxSpareThreads="15"/> I'm not sure what redirectPort is but I tried to telnet to that port and there's no one answering, so it shouldn't matter? Tomcat's webapps directory contains project.war and the server automatically deployed it under project directory which contains index.jsp and hello.html. The latter is for static debugging purposes. Now when I try to access http://project.demo.us.com/project/index.jsp, I get Tomcat's HTTP Status 404 - The requested resource () is not available. The same thing happens to hello.html so it's not working with static content either. Apache's access_log contains: 88.112.152.31 - - [10/Aug/2009:12:15:14 +0300] "GET /demo/index.jsp HTTP/1.1" 404 952 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2" I couldn't find any mention of the request in Tomcat's logs. If I shutdown this specific tomcat, I no longer get Tomcat's 404 but Apache's 503 Service Temporarily Unavailable, so I should be configuring the correct Tomcat. Is there something obvious that I'm missing? Is there any place where I could find out what path the Tomcat is using to look for requested files?

    Read the article

  • REST on *just* IIS7 (without a webframework)

    - by noblethrasher
    I want to upload files directly to IIS7 (in this case I am using the WebRequest object in .NET). Thus I need IIS7 to accept POST, PUT, and DELETE verbs such that I can upload and delete files on the server directly. Is it possible to have IIS accept files without a a web framework like ASP.NET? Essentially I want to be able to use IIS (HTTP) as an FTP server.

    Read the article

  • What is a usable throughput for a home media server

    - by Craig
    I am looking to setup a home server that will act as a media server. This will include both video (possibly HD) and audio. The clients will be a fun mix of hardware but that is a different question. What I want to know is what is the minimum throughput for streaming video without hitches? Is there a "sweet" spot for throughput (price vs. throughput)? I am determining my budget for this "upgrade" and I need to evaluate wether or not upgrading to a 1 Gbps home LAN is required. Sure, it would be sweet and easily handle the traffic but I don't want to do it unless it is necesary.

    Read the article

  • Ad-hoc connection between iPhone and Macbook Pro

    - by Phil Nash
    I sometimes find it useful to connect my iPhone to my Macbook Pro by creating an ad-hoc wireless network from the MBP and connecting to that from the iPhone. However, what I find is that sometimes this works and sometimes it doesn't. When it's not working the symptoms are usually that I see the ad-hoc SSID in the list of available networks on the iPhone, can connect to it from there (including entering my WEP key), and it shows up as the wifi network in use. However I don't get the wifi symbol in the taskbar (it remains as 3G) and attempting to use the connection (e.g. trying to connect to iTunes or Keynote using their respective Remote apps) fails saying that there is so wifi connection. I've tried rebooting both the iPhone and the MBP, recreating networks with different SSIDs and tried different channels - all to no avail! I'm especially puzzled that (a) sometimes it works just fine first time and (b) the Settings app seems to think its all connected fine. Is there anything else I should be trying?

    Read the article

  • QWebView problem rendering embedded fonts

    - by user313724
    Hi, I'm trying to render a web page, in QT 4.5, that uses an embedded font. Most of the time this works as expected. Unfortunately, sometimes I get really weird behaviour. The font is rendered - apparently - off-by-one. For instance the text: "By" woukd appear as "Cz" Has anyone run into this before? And - more importantly - knows how to fix this?

    Read the article

  • open flash chart rails x-axis issue

    - by Jimmy
    Hey guys, I am using open flash chart 2 in my rails application. Everything is looking smooth except for the range on my x axis. I am creating a line to represent cell phone plan cost over a specific amount of usage and I'm generate 8 values, 1-5 are below the allowed usage while 6-8 are demonstrations of the cost for usage over the limit. The problem I'm encountering is how to set the range of the X axis in ruby on rails to something specific to the data. Right now the values being displayed are the indexes of the array that I'm giving. When I try to hand a hash to the values the chart doesn't even load at all. So basically I need help getting a way to set the data for my line properly so that it displays correctly, right now it is treating every value as if it represents the x value of the index of the array. Here is a screen shot which may be a better description than what I am saying: http://i163.photobucket.com/albums/t286/Xeno56/Screenshot.png Note that those values are correct just the range on the x-axis is incorrect, it should be something like 100, 200, 300, 400, 500, 600, 700 Code: y = YAxis.new y.set_range(0,100, 20) x_legend = XLegend.new("Usage") x_legend.set_style('{font-size: 20px; color: #778877}') y_legend = YLegend.new("Cost") y_legend.set_style('{font-size: 20px; color: #770077}') chart =OpenFlashChart.new chart.set_x_legend(x_legend) chart.set_y_legend(y_legend) chart.y_axis = y line = Line.new line.text = plan.name line.width = 2 line.color = '#006633' line.dot_size = 2 line.values = generate_data(plan) chart.add_element(line) def generate_data(plan) values = [] #generate below threshold numbers 5.times do |x| usage = plan.usage / 5 * x cost = plan.cost * 10 values << cost end #generate above threshold numbers 3.times do |x| usage = plan.usage + ((plan.usage / 5) * x) cost = plan.cost + (usage * plan.overage) values << cost end return values end

    Read the article

  • how can I write a schema that produce an unordered xml with extension

    - by ekeren
    In the following schema I am trying to make an unordered xml that extends simpleConfigurationObject: <xs:complexType name="forTestingConfigurationObjectCreator"> <xs:complexContent> <xs:extension base="simpleConfigurationObject"> <xs:all> <xs:element name="a" type="xs:string"/> <xs:element name="b" type="xs:string" minOccurs="0"/> </xs:all> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="simpleConfigurationObject"> <xs:all> <xs:element name="base" type="xs:string" minOccurs="0"/> </xs:all> </xs:complexType> But I get the following error on the xs:all "all is not the only particle in the group, or is being used as an extension" (which is correct) Off-course if put the base element inside the xs:all and not use xs:extension at all I will get an unordered schema restriction. (but that is not what I want) The question is: how can I produce unordered schema with the extension? Thanks

    Read the article

  • TeamCity error: svn: connection refused by the server

    - by chrisk
    We have a Continuous Integration environment setup with TeamCity and subversion. TeamCity gets the latest source from svn and does a build (Visual Studio) on every commit. Sometimes we get the following TeamCity error when the build runs. Doing a couple of force builds gets TeamCity running succesfully. Build errors [12:35:24]: Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp6036patch_803[12:35:24]: RunBuildException when running build stage UpdateSourcesFromServer: Failed to build patch for build 519 {build id=803}, VCS root: svn: https://svn.myDomain.com/repos/myApplication {id=2}, due to error: org.tmatesoft.svn.core.SVNException: svn: connection refused by the server svn: REPORT request failed on '/repos/myApplication/!svn/vcc/default' Any ideas why this might be happening ?

    Read the article

  • IE and Content-disposition inline vs. extension-token

    - by pinkgothic
    Preamble So IE does Mime-Type sniffing. That part's old news. Suggestions of how to combat it tend to be along the lines of 'supply a content-type IE trusts' (i.e. anything that isn't text/plain or application/octet-stream) or 'add extraneous data at the start of the file that is definitely of the type you're serving'. Now, I'm working on an application that has to allow message attachments (like in e-mails), and we want to close up XSS vectors. IE's mime sniffing is one of those vectors - a text/plain file with html content will trigger as html. Recoding isn't an option at this point, changing the attachments the user has provided can only happen if there is absolutely no doubt about the maliciousness of the file - and someone might want to send HTML as text. Now, Microsoft's MSDN article implies the situation might be easier to fix than advertised: If Internet Explorer knows the Content-Type specified and there is no Content-Disposition data, Internet Explorer performs a "MIME sniff," [...] Great! Except I don't have IE nor current means to reliably install it (I realise this is a fairly sad state for a webdeveloper to be in, I hope to fix this soon) and this is grey theory that I can't quite seem to get confirmed one way or the other. Local sources say that line is hogwash - IE will mime sniff anything that is Content-Disposition: inline / <default> and not specific enough for its tastes in -Type. But what about x-* ('extension-token' in the RFC)? Trying to google for how browsers handle Content-Disposition: <extension-token> hasn't yielded anything (though I may just be doing it wrong, my understanding of Google is seriously slipping lately). I found one question that looked promising, but turned out to be a misunderstanding on side of the thread author, meaning that the train of thought was never actually addressed there. Question(s) Does IE really Mime sniff if you expressly pass Content-Disposition: inline? If so: Does anyone here know how browsers handle Content-Disposition: <extension-token>? If they do this in a way that is for my purposes benign, by presuming it to be synonymous with the default (effectively 'inline', though I hear it's not defined anywhere?), is it specific enough for IE not to Mime sniff? Or am I actually shooting myself in the foot by thinking of pursuing this avenue?

    Read the article

  • Facebook fan page canvas source?

    - by Andre
    Im trying to understand how to learn reading the source of a facebook fan page. So far, I can only get the layout displayed while viewing the source. Here is an example: If you go here: http://www.facebook.com/pages/See-oho-nieps-YothG-RRofiLe/106340746065367#!/pages/Milton-Keynes-United-Kingdom/IF-MR-BEAN-WAS-IN-AVATAR-HE-WOULD-LOOK-LIKE-THIS/302690570115 That canvas page requires you to be a fan of the page. This is done with: content here My question is, why cant I find the FB:visible code in the source of that page? I would be grateful for any guidance!

    Read the article

  • Routing with command controller and sub controllers without using areas

    - by user205258
    How can I create a routing structure for a project management application where there are discrete controllers for all the relevant pieces such as TaskController, DocumentController etc and an Over arching controller. I would essentially like a structure like: http://server/Project/123/Task http://server/Project/123/Document I am using mvc1 so I have no access to areas etc. The project section will have a separate master page for project controllers such as task, document etc with a dfferent menu navigaton. I have tried three routes together n Global.asax like: routes.MapRoute( "Task", "Project/{id}/Task/{action}", new { controller = "Task", action = "Index", id = "" } ); routes.MapRoute( "Message", "Project/{id}/Message/{action}", new { controller = "Message", action = "Index", id = "" } ); routes.MapRoute( "Document", "Project/{id}/Document/{action}", new { controller = "Document", action = "Index", id = "" } ); What am I doing wrong here

    Read the article

  • Why is UIControlTouchUpInside UNDEFINED?

    - by munchine
    I've got a simple question but it has got me confounded. The code below gets an UNDEFINED error for UIControlTouchUpInside. What do I need to include or import? If I comment out the line, it works. So that means forState:UIControlStateNormal is defined. I'm new so hope you can help. UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setTitle:@"Accept?" forState:UIControlStateNormal]; [button addTarget:self action:@selector(acceptTapped) forControlEvents:UIControlTouchUpInside];

    Read the article

  • Does anyone know of Telerik deals?

    - by Seagull
    This may be the wrong forum to ask... But since there are so many Telerik fans here, I was wondering if anyone is aware of discount coupons or upcoming deals the company may have? I ask because VS2010 is coming, and I suspect they may therefore have deals released at a similar timeframe. I am a bit 'cheap' because I am just starting a one-man business...

    Read the article

  • What freeware/floss tools are available to help load data into SPSS?

    - by tardate
    I'm looking for a solution for producing SPSS format data files for loading into SPSS. The few offerings I can find are all commercial. Has anyone experience with generating SPSS-format data files using open-source, freeware or home-grown solutions? I'm not even sure that the file format is "open". Any hints appreciated (any language is fine, although java, perl or ruby preferred).

    Read the article

  • oauth process for twitter. the difference between client and web application

    - by Radek
    I managed to make the oauth process work for PIN kind of verification. My twitter application is client type. When enter authorize url into web browser and grant the application access then I have to enter pin in my ruby application. Can I finish the process of getting access token without the pin thing? My current code is like. What changes do I need to do to make it work without pin? gem 'oauth' require 'oauth/consumer' consumer_key = 'w855B2MEJWQr0SoNDrnBKA' consumer_secret ='yLK3Nk1xCWX30p07Id1ahxlXULOkucq5Rve28pNVwE' consumer=OAuth::Consumer.new consumer_key, consumer_secret, {:site=>"http://twitter.com"} request_token = consumer.get_request_token puts request_token.authorize_url puts "Hit enter when you have completed authorization." pin = STDIN.readline.chomp access_token = request_token.get_access_token(:oauth_verifier => pin) puts puts access_token.token puts access_token.secret

    Read the article

  • Why can't anyone else access my website in IIS on Windows 7?

    - by Rod
    I've got an ASP.NET application that I have in IIS on my Windows 7 Ultimate machine. I've tested it from that machine and it works fine. This machine is in my home network, a simple peer-to-peer network. The strange thing is that no one else in my network can access that website. Why is that? There are other Windows 7 machines here, and they're all in the some homegroup. When I attempt to access the website on my machine from one of the other machines, it fails and that's it. So, what's wrong?

    Read the article

  • Building My First Computer And Suprise It Isn't Working

    - by BobbShots
    I've had many years of experience working on and around computers, but this was my first foray into building one completely from scratch. So far that foray has been a disaster. My rig is completely assembled, and on its maiden power-up plus many power cycles I noticed three things: There were a few beeps from the BIOS POST upon powering up the first time, but I wasn't paying attention completely to the sequence. However, every time after that there are 0 POST beeps, even after taking off all hardware except the CPU and MB. There was no video being sent to the monitor. I run a HDMI cable from my video card to the monitor. The video card was LOUD. My card is a Sapphire Radeon HD 5870 which is known for not only being a powerhouse, but being pretty quiet. A few times during my power cycles it ran a lot quieter, but most of the time it was just super loud. Can anyone provide help for any of these issues? My MB, CPU, and Video Card are: MB: ASUS P6X58D Premium LGA 1366 Intel X58 SATA 6Gb/s USB 3.0 ATX Intel Motherboard CPU: i7 920 Video Card: Sapphire Radeon HD 5870

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >