PHP - Accepting Recurring Card Payments - Storing Details
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 Similar TutorialsThis topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=315057.0 Hi, I have successfully implemented a master details page with the results aligned in columns linking to a details page. I wish to maintain the recordID passed from the master details page and make the dynamic text, which reads Shade A tree that is capable of..... in the attached screen shot a link to another details page referencing the same recordID. The detailspage2.php would look the same as the screenshot except the Shade text and description below will be highlighted, which I can do, there will be a new image and a new image description. All other dynmaic elements on the page will remain the same. I tried to simply save as my detailspage.php to detailspage2.php and create a link to detailspage2.php. It linked to detailspage2.php but none of the record info showed up in their respective table cells. I have all the names desc's, images, etc setup in a table in my database. Please let me know what code and other info you need to help me out with this procedure. Thanks. Hey, i have made a silly little tester game just to see if i could, its he http://www.zephni.com/test/pairs its for some guy who is attending college and he was given the assignment to make a game of pairs using PHP to sort the cards and lay them down, and javascript to handle the actual game. Anyway at the moment, my game sorts out the cards as if they are values from 1 to 52, and picks randomly 18 cards from them. During the game, the cards have to be excatly the same, as in: if(card_picked1 == card_picked2){ win pair } that means that both cards would have to be the same number AND suit. But in pairs you have to pick the same number but obviously in a different suit. Any way I have been trying some diff code to pick 18 cards from the pack. It picks 9, and then doubles them up but +'s 13 to the card so it is the same number card. Here is the code Code: [Select] <?php $i = 1; $total_cards = 18; #Sorting out cards $card_sort = range(1,52); while($i <= ($total_cards/2)){ $pick_card = $card_sort[rand(1,52)]; if($pick_card !== null){ $cards[] = $pick_card; } unset($card_sort[$pick_card]); $i = $i+1; } foreach($cards as $card){ echo($card."<br/>"); } ?> I would of thought that when you unset the number from $card_sort that was picked it would'nt choose it again if($pick_card !== null) but it still chooses the same card twice sometimes. I know I really havent explained this well, but i did my best for 9am... Hi guys, long-time reader here and finally have my own question. I have a MySql db from which I get a CSV file that I need in XML. The problem is, the parent nodes appear multiple times in the CSV and so do other values. Let me give you a quick overview of what the data I have looks like, and the XML of what I need to achieve as output. CSV: FR,FRANCE,CITY002,A,CITY000,B,CITY001,C,CODE1,NAME1 DE,GERMANY,CITY004,D,NULL,NULL,NULL,NULL,CODE2,NAME2 FR,FRANCE,CITY003,E,CITY000,B,CITY002,A,CODE3,NAME3 XML: <countries> <country code="FR" name="FRANCE"> <city name="A" code="CITY002"> <hotel name="NAME1" code="CODE1" /> <hotel name="NAME3" code="CODE3"/> </city> <city name="B" code="CITY000"> <hotel name="NAME1" code="CODE1" /> <hotel name="NAME3" code="CODE3"/> </city> <city name="C" code="CITY001"> <hotel name="NAME1" code="CODE1" /> </city> <city name="E" code="CITY003"> <hotel name="NAME3" code="CODE3"/> </city> </country> <country code="DE" name="GERMANY"> <city name="E" code="CITY003"> <hotel name="NAME2" code="CODE2" /> </city> </country> </countries> Now I know it looks kinda complicated because the context isn't immediately obvious, but if it wasn't, I wouldn't be posting here I started using file() to get each line into an array and then used explode() in a loop to generate new arrays. The only thing where I am struggling is going back and adding cities to countries but not duplicating them. If a city (or country) already exists, then I should just add to the parent node. Not sure if anyone even understands this as, reading over it again, not even I do but if you have any questions that may clarify the issue, let me know. I'm probably just looking for a way to create a multidimensional arrays, using the parent node as an index or something like that. Thanks, Daniel hello, is there any way that i can take a string like this: 99,99,28,99,28,112,78,99,28,112,78,28,112,78,112,78,112, and find and remove the recurring numbers so i am left with this:? 99,28,112,78 thanks for your time Joe Hello,
I am trying to figure out why paypal recurring payment always shows as Pending when I use my following code?
this is a very basic HTML form which i use for recurring payment in paypal. but when the users sign up using the following code, the payment status shows as "PENDING"!
could someone please help me to solve this issue?
Thanks in advance.
here is my html form:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="mysandboxemail@gmail.com"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="cbt" value="Return to The Store"> <input type="hidden" name="cancel_return" value=" <?php echo $actual_link ?>"> <input type="hidden" name="custom" value="This is a custom field!!!"> <input type="hidden" name="item_name" value="ACCOUNT UPGRADE"> <input type="hidden" name="a3" value="5.00"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> I'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! 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? 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! 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 I posted this in the Regex forum, but the regex I have works fine, so this seems to be more of a php problem Quote from: Minklet on August 16, 2010, 11:48:23 PM Similarly, this regex to allow an embed code for youtube also will not work when it comes from a form field. This doesnt work: $embed = $_POST['mixembedlink']; if (preg_match('/<object width=\"([0-9]*)\" height=\"([0-9]*)\"><param name=\"movie\" value=\"(.*)\"><\/param><param name=\"allowFullScreen\" value=\".*\"><\/param><param name=\"allowscriptaccess\" value=\".*\"><\/param><embed src=\".*\" type=\".*\" allowscriptaccess=\".*\" allowfullscreen=\".*\" width=\"[0-9]*\" height=\"[0-9]*\"><\/embed><\/object>/',$embed,$preg_out)) {; $width = $preg_out[1]; $height = $preg_out[2]; $url = $preg_out[3]; echo 'WORKING'; } else { echo 'NOT WORKING!'; } This however does work: $embed = '<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/1mt3vZHDiM8?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/1mt3vZHDiM8?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>'; if (preg_match('/<object width=\"([0-9]*)\" height=\"([0-9]*)\"><param name=\"movie\" value=\"(.*)\"><\/param><param name=\"allowFullScreen\" value=\".*\"><\/param><param name=\"allowscriptaccess\" value=\".*\"><\/param><embed src=\".*\" type=\".*\" allowscriptaccess=\".*\" allowfullscreen=\".*\" width=\"[0-9]*\" height=\"[0-9]*\"><\/embed><\/object>/',$embed,$preg_out)) {; $width = $preg_out[1]; $height = $preg_out[2]; $url = $preg_out[3]; echo 'WORKING'; } else { echo 'NOT WORKING!'; } Can anyone shed some light on why this is? The form names are exactly right. I think i've checked and renamed them about 10 times each. I checked with firebug and compared the POST value to the string in the one that works and they are exactly the same. I can't figure out what the problem is at all Hi guys, I am creating a quiz system for my personal site, I am done with all the quiz questions creating part, but I am stuck with something like... user taking a random sql generated quiz and submitting it.. Here's randomly generated sql quiz, even the answers are in random order: <form method="post"> <b>1. What is color or sky</b> <ol> <li><input name="question_3_answer" type="radio" value="6" /> sky</li> <li><input name="question_3_answer" type="radio" value="8" />blue</li> <-- true <li><input name="question_3_answer" type="radio" value="3" />red</li> </ol> <b>2. What is name of my cat</b> <ol> <li><input name="question_6_answer" type="radio" value="9" />brat</li> <--true <li><input name="question_6_answer" type="radio" value="7" />rat</li> </ol> <b>3. What is name of my pet</b> <ol> <li><input name="question_18_answer" type="radio" value="9" />cat</li> <--true <li><input name="question_18_answer" type="radio" value="7" />dog</li> </ol> </form> Now this is tricky part for me is.. receiving these data in another page.. since it's randomly generated questions, how do I know which question it is? here's example I've tried : $list_all_quiz_questions = $db->get_row("SELECT question_id, its_true_ans_id FROM question_table WHERE quiz_group = 'ef23fsdfers3e' "); $i = 1; foreach ($list_all_quiz_questions as $myquestion) { $answer.$i == $_POST["question_".$myquestion->question_id."_answer"]; //?????????? not working lol ;(( $i++ } Hi, I've just installed a guestbook but when posting a message (signing in) it shows 'no entries yet'. On clicking the submit a very quick screen splashes up with a load of writing out of whoch I could just read ...line function open data file... You can check it out at www.qualitycarersdirect.com/careasp/portal.asp then click on 'post on the baord' it is a php file. I manage a simple website for a small business - nothin fancy. I'm interested using some php to enhance the site a bit. I'm looking to accept some user input and put it into a database then display it back to them on another page. What php functions would be best to use to accomplish this? Thanks for the input! Hi Everyone, I'm trying to figure out why my my form isn't accepting any values I put into it. I've been trying to figure this out for the past 2 hrs and I'm stumped. Any ideas please let me know. Thanks everyone! http://whatsmyowncarworth.com/auto/form2.php Code: [Select] <?php include('init.php'); $firstname = mysql_real_escape_string($_POST['firstname']); $lastname = mysql_real_escape_string($_POST['lastname']); $address = mysql_real_escape_string($_POST['address']); $state = mysql_real_escape_string($_POST['state']); $city = mysql_real_escape_string($_POST['city']); $sql="INSERT INTO customers (first_name, last_name, address, state, city) VALUES('$firstname','$lastname','$address','$state','$city')"; if ($firstname && $lastname && $address && $state && $city) { } else echo "You must fill the entire form!"; ?> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> http://whatsmyowncarworth.com/auto/form.php Code: [Select] <html> <body> <form method="post" action="form2.php"> <table> <tr> <td>Firstname:</td> <td><input type="text" name="firstname"></td> </tr> <tr> <td>Lastname:</td> <td><input type="text" name="lastname"></td> </tr> <tr> <td>Address:</td> <td><input type="text" name="address"></td> </tr> <tr> <td>State:</td> <td><input type="text" name="state"></td> </tr> <tr> <td>City:</td> <td><input type="text" name="city"></td> </tr> <tr> <td><input type="submit" name="submit" value="Register!"></td> </tr> </table> </form> </body> </html> I’ve got a well proven php-mysqli website that works perfectly on desktops. It requests the email and password on the login page, taking that data and inspecting it before processing further. I’ve designed the presentation using CSS to be responsive and it’s working well, except for ..
.. when I used it on my Nexus 4 and 7 the web site appeared. I touched the menu item ‘login’ and I entered both the correct email and password. However, the application bounced back as it should if either the email or password was wrong. So I inserted PHP scripting and confirmed that the site was receiving the correct email but a wrong password. The logic is 100% proven and the data entry correct.
Is there something with the google nexus (and smartphones in general) that disallows web site passwords until some parameter is set? I'm hoping a responsive website developer accommodating nexus 4 or 7 can assist here.
Hey guys, I am new to php and I have a project to do that includes creating a payroll system.What i am trying to get done is a clock in and clock out time card using php.This is what I have so far but when I run it, the date and time is incorrect can someone please help me Hi, I want to know something on credit card processing. I do not have any problem here, but want to know how ca shopping website is processed! For example, a website is selling shoes online, where people will use either VISA or any credit card to buy, then the shoes will be delivered to the person's place. I want to know, how these credit cards are stored, I mean do these information are stored in the database, the website administrator will take the credit number etc...to get the money from the bank? I have two sites on two different servers server1: has the purchase page where it asks for credit card numbers etc. server2: has the CGI files to send payment data directly into the payment processor. I cannot put the CGI files on server1 due to security restrictions, etc. My question is: How can I securely transmit the credit card data from server1 to server2? Thanks! |