PHP - Paypal Parallel Payments Demo
Hi there,
I am working on a PHP Ecommerce website. We have multiple Suppliers on the website listing their products. Now when a customer buys multiple products belonging to multiple suppliers, the payment has to go to those different respective suppliers through a single Paypal checkout. I have come to know that there is a way of doing is using Paypal Parallel payments method. Its he http://feefighters.com/blog/paypal-announces-adaptive-payments-parallel-payments-and-chained-payments-functionality-via-api/ Anybody here has a working demo of how it works. Kindly reply. Thank you! All comments feedback are always welcomed! Similar TutorialsI'm looking for a solution, i thought this was it. Im making a website that sells training videos. Each video has a producer that gets a certain percentage of the payment. Both paypal addresses are known and the percentages are known. How can I make this happen? Adaptive payments parallel payments pull up a screen that shows who is getting paid. That can't happen it needs to be under the radar. Is this possible with paypal? Thanks! In order to solve my problem I have been told to use multi threading, In my research I have found parallel because thread is not recommended for web server environments, What is CLI? php.net has the info but I may just be a little stupid, When looking for more information, I found something called compose, which I may need to install, but I am using shared hosting so it may not be possible. I have found that many hosts are unwilling to do anything beyond the basics.
1. Can parallel be used without installing these added dependencies or packages? Hi Guys, I'm really [confused] about this however what I have so far is create a simple HTML form, instructing the end user to enter a list of keywords with links to replace them with in the following format: A keywords followed by a comma and then URL and semicolon: For example: birds,http://www.birdwatching.com/; snakes,http://www.whales.com/; horses,http://www.horse.com/; What I have done next is split each word with its associated url after each newline and then placed all the words into 1 array and all the urls into another array, using the following code: preg_match_all('/(.*),(.*);/',$wordsurls, $phrase); $wds = $phrase[1]; $rurls = $phrase[2]; foreach($wds as $wd) { $words_array[] = $wd; } foreach($rurls as $rurl) { $urls_array[] = $rurl; } All that works perfectly fine but now I wish to search a string to find each of those keywords, and if they exist I would like to replace them with the URL. I believe this can be done using Parallel Array matching but do not know how to go accomplishing this. Could someone please help me? Thank you in advance. M Hi all, first of all sorry if this is in the wrong board, im currently building a site which will charge an annual fee of X amount. I've never build something like this before so Ill be using paypal for ease of use and security, but how would you usually go about constructing the tables etc? I have a small project. I have a control board that is connected to the parallel port. It controls 8 strips of LED on the LPT1 port. I can turn these on and off via the command prompt, using LPTOUT.exe ie lptout 1 turns on the 1st LED lptout 2 will turn off 1st LED and turn on 2nd, lptout 4 turns on 3rd and 2nd off, etc 1, 2, 4, 8, 16, 32, 64, 128. and combinations ie lptout 3 turns on LEDS 1 and 2, and so on. However lptout seems very unresponsive sometimes I have to do lptout 1 twice before LED 1 turns on. Is there another command I can use to write to LPT1 port. I need some PHP code to control the outputs. I want to sequence the outputs ie 1on (1second) 2on (1 second) 3 on (1 second) 4 on etc. to 8, then all off then repeat. Can anyone help me. THANK YOU. Hey php developers. I'm Brent from Beanstream. We just recently opened up some code bounties to create a PHP SDK that uses our payment gateway API. Each bounty is around 1-5 hours work and their reward is between $150 and $400. The SDK is open source (MIT license) and will be hosted on GitHub. There are already 2 other SDKs written in Java and C# that use the same RESTful payments API, so a lot of the code and functionality can be copied over to the PHP SDK. If you are interested in helping out you can sign up here. You can also check out Beanstream's Payments API to see what the SDK will be implementing: http://developer.beanstream.com Feel free to message me if you have questions. Cheers, Brent Beanstream Internet Commerce This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=348359.0 Not sure if this is in the right forum (if not can a mod move it please).... Im creating a site that is based on a subscription basis. Therefore i need to allow the user to input their card details for me to store to allow payments every month (and also for them to update when needed). How do you recommend storing card details in the database, im guessing its not secure just to store them as plain text? Opinions needed Hey guys ;-) I got a client that asked me today to create him an MLM type website. The first part of my work would be to test if there system works so I need to run a full demo of the multilevel structure. The MLM structure works as follow: 1 person finds 2 members and they then find 2 more each and so on until we reach 100 level deep. If i got this right, At level 5 there will be 25 members At level 10 there will be 100 members At level 20 there will be 400 members At level 40 there will be 1.600 members At level 100 there will be 10.000 members So at the end of the demo there should be 10k members inserted into the table The table looks like this: id, parent, level, under Parent is the ID of the guy that recruited him, level is the level that guy is at (level 1, 2 , 3, 4 or 5) and under is the number of people under him. I need to run a script that will insert all the data into that table so that we can run some test on the liability of the project so we can set the rates right. At first I thought it would be a piece of cake ... but when I started I found out very fast that populating the MLM network 5 level deep is gona be tricky ... my first attempt gave me a result that looks like this: Code: [Select] |0| |1|2| |x|x|3|4| x|x|x|x|x|x|5|6| As you can see the script only grab the last id then adds 2 new members then uses the last one as the parent and starts over ... So my script is useless and I did not figer out how to do everything in 1 step ... Any help would be appreciated. Hello everyone, Let me start by saying that this is my first post on this forum and that I am quite a noob when it comes to scripting. With that said, here is my problem: I am trying to edit a getID3 demo file properly to retrieve metadata from mp4 files. The code below belongs from the demo file. <?php require_once('../getid3/getid3.php'); $getID3 = new getID3; $DirectoryToScan = '../container'; $dir = opendir($DirectoryToScan); echo '<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="3">'; echo '<TR><TH>Filename</TH><TH>Artist</TH><TH>Title</TH><TH>Bitrate</TH><TH>Playtime</TH></TR>'; while (($file = readdir($dir)) !== false) { $FullFileName = realpath($DirectoryToScan.'/'.$file); if (is_file($FullFileName)) { set_time_limit(30); $ThisFileInfo = $getID3->analyze($FullFileName); getid3_lib::CopyTagsToComments($ThisFileInfo); echo '<TR>'; echo '<TD>'.$ThisFileInfo['filenamepath'].'</TD>'; echo '<TD>'.(!empty($ThisFileInfo['comments_html']['artist']) ? implode('<BR>', $ThisFileInfo['comments_html']['artist']) : ' ').'</TD>'; echo '<TD>'.(!empty($ThisFileInfo['comments_html']['title']) ? implode('<BR>', $ThisFileInfo['comments_html']['title']) : ' ').'</TD>'; echo '<TD ALIGN="RIGHT">'.(!empty($ThisFileInfo['audio']['bitrate']) ? round($ThisFileInfo['audio']['bitrate'] / 1000).' kbps' : ' ').'</TD>'; echo '<TD ALIGN="RIGHT">'.(!empty($ThisFileInfo['playtime_string']) ? $ThisFileInfo['playtime_string'] : ' ').'</TD>'; echo '</TR>'; } } ?> I have added 2 test files in 'container' for testing only. See this image for the result I am getting. As you can see the code isn't retrieving any data at all. Can anyone help me out with this? Thanks in advance, Melissa good evening dear community! Howdy, at the moment i am debugging some lines of code... purpose: i want to process multiple webpages, kind of like a web spider/crawler might. I have some bits - but now i need to have some improved spider-logic. See the target-url http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50 This page has got more than 6000 results! Well how do i get all the results? I use the module LWP::simple and i need to have some improved arguments that i can use in order to get all the 6150 records Attempt: Here are the first 5 page URLs: http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=0 http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=50 http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=100 http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=150 http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=200 We can see that the "s" attribute in the URL starts at 0 for page 1, then increases by 50 for each page there after. We can use this information to create a loop: #!/usr/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TableExtract; use Text::CSV; my @cols = qw( rownum number name phone type website ); my @fields = qw( rownum number name street postal town phone fax type website ); my $i_first = "0"; my $i_last = "6100"; my $i_interval = "50"; for (my $i = $i_first; $i <= $i_last; $i += $i_interval) { my $html = get("http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50&s=$i"); $html =~ tr/r//d; # strip the carriage returns $html =~ s/ / /g; # expand the spaces my $te = new HTML::TableExtract(); $te->parse($html); my $csv = Text::CSV->new({ binary => 1 }); foreach my $ts ($te->table_states) { foreach my $row ($ts->rows) { #trim leading/trailing whitespace from base fields s/^s+//, s/\s+$// for @$row; #load the fields into the hash using a "hash slice" my %h; @h{@cols} = @$row; #derive some fields from base fields, again using a hash slice @h{qw/name street postal town/} = split /n+/, $h{name}; @h{qw/phone fax/} = split /n+/, $h{phone}; #trim leading/trailing whitespace from derived fields s/^s+//, s/\s+$// for @h{qw/name street postal town/}; $csv->combine(@h{@fields}); print $csv->string, "\n"; } } } i tested the code and get the following results: .- see below - the error message shown in the command line... btw: here the lines 57 and 58: #trim leading/trailing whitespace from derived fields s/^s+//, s/\s+$// for @h{qw/name street postal town/}; what do you think? Sta�e please Ot",,,Telefo,Fax,Schulat,Webseite Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. "lfd. N.",Schul-numme,Schul,"ame Sta�e please Ot",,,Telefo,Fax,Schulat,Webseite Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. "lfd. N.",Schul-numme,Schul,"ame Sta�e please Ot",,,Telefo,Fax,Schulat,Webseite Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. "lfd. N.",Schul-numme,Schul,"ame Sta�e please Ot",,,Telefo,Fax,Schulat,Webseite Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. Use of uninitialized value $_ in substitution (s///) at bavaria_all_guru.pl line 58. "lfd. N.",Schul-numme,Schul,"ame good day, hello dear community! i am currently ironing out a little parser-script. I have some bits - but now i need to have some improved spider-logic. See the target-url http://192.68.214.70/km/asps/schulsuche.asp?q=e&a=50 This page has got more than 6000 results! Well how do i get all the results? I tried out several things - but i dont helped. I allways got bad results. See i have good csv-data - but unfortunatley no spider logic... I need some bits to get there! How to get there!? I use the module LWP::simple and i need to have some improved arguments that i can use in order to get all the 6150 records #!/usr/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TableExtract; use Text::CSV; my $html= get 'http://192.68.214.70/km/asps/schulsuche.asp?q=n&a=50'; $html =~ tr/r//d; # strip the carriage returns $html =~ s/ / /g; # expand the spaces my $te = new HTML::TableExtract(); $te->parse($html); my @cols = qw( rownum number name phone type website ); my @fields = qw( rownum number name street postal town phone fax type website ); my $csv = Text::CSV->new({ binary => 1 }); foreach my $ts ($te->table_states) { foreach my $row ($ts->rows) { trim leading/trailing whitespace from base fields s/^s+//, s/\s+$// for @$row; load the fields into the hash using a "hash slice" my %h; @h{@cols} = @$row; derive some fields from base fields, again using a hash slice @h{qw/name street postal town/} = split /n+/, $h{name}; @h{qw/phone fax/} = split /n+/, $h{phone}; trim leading/trailing whitespace from derived fields s/^s+//, s/\s+$// for @h{qw/name street postal town/}; $csv->combine(@h{@fields}); print $csv->string, "\n"; } } Well - with this i have a good csv-output:- but unfortunatley no spider logic. How to add the spider-logic here... !? well i need some help Love to hear from you hello dear all, good day dear php-freaks,
i want to rssify content from another website into my wordpress-page: see the source: https://europa.eu/youth/volunteering/project_en well - is it possible to do this? of course - i have to ask bout the permission at the site of source. but the technical site is also interesting :do you think that this is doable!? note: i only am interested in the summary of the data - that is only a little piece of text.
hey guys im really just after a bit of help/information on 2 things (hope its in the right forum).
1. basically I'm wanting to make payments from one account to another online...like paypal does...im wondering what I would need to do to be able to do this if anyone can shine some light please?
2.as seen on google you type in a query in the search bar and it generates sentences/keywords from a database
example:
so if product "chair" was in the database
whilst typing "ch" it would show "chair" for a possible match
I know it would in tale sql & json but im after a good tutorial/script of some sort.
if anyone can help with some information/sites it would be much appreciated.
Thank you
Hi, I am new here, so hello everyone. I really need some help with getting Paypal IPN working correctly. This is what I am trying to do. I have a user database, when the user logs in, they have the option to upgrade/subscribe to our website. So when they subscribe and payment is validated, I want a specific field in a specific table updated based on the user's unique ID, not based on [payer_email], so how do I pass on that parameter using IPN? right now I added the "userId" to a hidden field in the Paypal subscription form named "on1".... I hope this isn't confusing - would really appreciate your help - I added code below. Code: [Select] <?php DB info -- // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // PAYMENT VALIDATED & VERIFIED! $email = $_POST['payer_email']; $userId=$_POST['on1']; $membership = '2'; mysql_query("UPDATE users SET membership=".$membership." WHERE userId=".$userId) or die(mysql_error()); $to = $email; $subject = 'subject line'; $message = ' message here '; mail($to, $subject, $message, $headers); } else if (strcmp ($res, "INVALID") == 0) { // PAYMENT INVALID & INVESTIGATE MANUALY! $to = 'my_email'; $subject = 'subject lin'; $message = ' Dear Administrator, A payment has been made but is flagged as INVALID. Please verify the payment manualy and contact the buyer. Buyer Email: '.$email.' '; $headers = 'From:my_email' . "\r\n"; mail($to, $subject, $message, $headers); } } fclose ($fp); } ?> I am trying to get a Paypal IPN working using PHP. I have attached the code I have written that is not working. I have no real way to test it other than nothing is being posted to the databases. The transactions seem to complete with paypal, but I get no information and no emails are generated. Any help would be much appreciated. Hi all I have a quick PayPal IPN question, is this the right group to post the message and does anyone know much about the PayPal IPN? Thanks Hi Does any one know of any good tutorials for paypal web payments pro, or recommend books Thanks in advance Hey guys i have created a paypal IPN script and it takes various info from users via paypal. Anyways i store their info into a database along with their email however i dont want them to be able to purchase again with the same email (long story) anways by the time i receive the info from paypal the payments already gone through so its too late for me to do the checking against the database. Is there anyway i can auto refund the payment do paypal allow this? Hope someone can help. Thanks! Hey All, I have setup a Paypal API to handle the recurring payments on my website, once the payment is completed I get a token id and ba_token id return. I am storing this in a database, but wondered how people link this with a user table? I could use a cookie to store the user's id before payment and then get it once the payment is complete, but this would not work with the subsequent recurring payments. How do you go about sending the user id when a recurring payment happens? Any advise would be appreciated. Edd |