Jump to content

zimminy

Members
  • Posts

    14
  • Joined

  • Last visited

About zimminy

  • Birthday 01/11/1966

Contact Methods

  • Website URL
    http://www.mommatown.com

Profile Information

  • Gender
    Female
  • Location
    Jacksonville FL

zimminy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got help via their support already. I used IRC on web https://webchat.freenode.net/ #Stripe... Support there says I am using a recipient ID for "Paul" and need to connect to Paul via their oAuth scripts, then use THAT connection id. They do not know why I am getting error code line 5.
  2. Hi Guys, Can someone please help me. I have following PHP code that works fine. I get Stripe token, I get all good results, and see that Stripe transaction appears in my test account. This scenario should work if: Shelly buys widget from Paul and pays Paul directly. I made this code to to make sure I get good results from simplest type of transaction, and I do, it works fine. \Stripe\Stripe::setApiKey(STRIPE_PRIVATE_KEY); $charge = \Stripe\Charge::create(array( "amount" => $amount, // amount in cents "currency" => "usd", "source" => $token, "description" => $email ) ); But when I try to add these two parameters, so that: Shelly uses Jill's site to buy widget, Jill gets 1.50 as a fee, Paul gets 18.50 for widget. I'm Jill, and this is my code to try and send Paul his money and get my 1.50. I don't want managed account scenario, I want direct connect so that Paul deals with refunds, etc. Private key below is Jill's (my) private key and the destination below is Paul's Stripe ID \Stripe\Stripe::setApiKey(STRIPE_PRIVATE_KEY); \Stripe\Charge::create(array( 'amount' => $amount, 'currency' => 'usd', 'source' => $token, 'application_fee' => $jillfee, 'destination' => 'rp_16ElxDFGdfgFGd7jL7Vj4QU' )); I do have a try/catch in place and when I use this catch area, I get result 5 } catch (\Stripe\Error\Card $e) { // Card was declined. $e_json = $e->getJsonBody(); $err = $e_json['error']; $errors['stripe'] = $err['message']; echo '1 card declined'; } catch (\Stripe\Error\ApiConnection $e) { echo '2 Network problem, perhaps try again.'; } catch (\Stripe\Error\InvalidRequest $e) { echo '3 You screwed up in your programming.'; } catch (\Stripe\Error\Api $e) { echo '4 Stripe servers are down!'; } catch (\Stripe\Error\Base $e) { echo '5 Something else that is not customer fault.'; } any help very much appreciated!
  3. I worked with PHP for several years, then have worked for the last 2 with Coldfusion. I do the following in coldfusion and tried the same type of thing in PHP, but PHP does not return proper results. Does anyone know how I can make this work in PHP? Any tips/help VERY much appreciated, I an my daughter have a lot of coding work waiting for this answer! Neither one of us can figure this out. Coldfusion example: //in the javascript/jquery section of the page: function getOrders(customerid){ $.get('scripts/orderrequests.cfc?method=getOrders&custid='+customerid, function(data){ document.getElementById('orderdiv').innerHTML = data; } ); } then further down on the page <a href="javascript:getOrders(#customerid#)">Click here to list all of your orders.</a><br> <div id="orderdiv"></div> --------- then, briefly... in scripts/orderrequests.cfc is the coldfusion function that gets the orders out of the database, and returns an entire html table of the orders <cfunction name="getOrders" ...> <cfargument name="custid" required="yes"/> <cfquery.... gets the order info out of db just like any mysql query basically...> <cfsavecontent variable="tableinfox"> <table> <tr><tr><td>#orderid#</td><td>#orderdate#</td></tr></table> </table> </cfsavecontent> <cfreturn tableinfox/> </cfunction> ------------------- The scenario beautifully loads the order data into the div "<div id="orderdiv"></div>" above. Been using this for two years in coldfusion, and I would LOVE to figure out how to do the same scenario in PHP, so I tried.. function getOrders(customerid){ $.get('includes/gettheorders.php?custid='+customerid, function(data){ document.getElementById('orderdiv').innerHTML = data; } ); } <?php echo '<a href="javascript:getOrders('.$customerid.');">Click here to list all of your orders.</a><br /><div id="orderdiv"></div>'; ?> Then, "includes/gettheorders.php" is just a simple php query that loads the orders into a table...outputs it to it's own page, which then should be returned as that "data" in function(data)... and loaded into the div.. "document.getElementById('orderdiv').innerHTML = data;" When I tried this with various code on "gettheorders.php", the best I can do is that, "gettheorders.php" can return ONE number "3" but not "content" like an HTML table full of content.. What do I need to do to make this kind of scenario work in PHP? I obviously want to return more content than just a number. I am so hungry for this answer, you don't even know.. but then you are programmers who have also banged your head against your desk, so I guess you do!
  4. Why does this not work? it returns "undefined" for the Strings - I want to use an image, not a button, and yet I can make it work with a button but not an image. I've been reading through newbie tutorials all evening and have tried every twist I could find. W3schools says an onClick event can be used on an image, but somehow it's wrong. Thanks for the help! <html> <head> <script type="text/javascript"> <!-- function votYes(vnum,fnum){ var myString=vnum.value; var myString2=fnum.value; var myNewString = "you voted a number " + myString + " for food item number " + myString2; var box = document.getElementById('box');box.innerHTML = myNewString; } // --> </script> </head> <body> Food Item 1 <div name="box" id="box"><img src="one.gif" onclick="votYes(1,33);" border="0" /></div><br><br> </body> </html> You can see my train wreck here: http://mommatown.net/practice_js3.php
  5. I guess I'll just load that one var with data pieces and explode it in my other php file.. 1_2_5_6...
  6. Been coding in PHP for years, using and working with Javascript but not writing it from scratch at all. Trying to get a handle on how to Ajax and javascript for a project this week. Have a question. This works fine, tested it on my host, it's from w3schools: <!DOCTYPE html> <html> <head> <script type="text/javascript"> function showCustomer(str) { var xmlhttp; if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajaxtestpost.php?vv="+str,true); xmlhttp.send(); } </script> </head> <body> <form action=""> <select name="customers" onchange="showCustomer(this.value)"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </form> <br /> <div id="txtHint">Customer info will be listed here...</div> </body> </html> Question is this: How do I add to the form this: <input type="hidden" name="foodid" id="foodid" value="5"> and have it end up populating the info here, so that my ajaxtestpost.php page can use it?: xmlhttp.open("GET","ajaxtestpost.php?foodid="+str2"&&vv="+str,true); The things I have tried did not work, I am a little lost... Thanks much!!!
  7. well I guess that means when the server guys upgrade PHP again, my site may not work, because it is full of em... yipes!! thanks for letting me know!
  8. or you can do: value="<?=$thisvalue;?>: also - no echo statement needed
  9. This is what I use to email: $headers2="Cc: jody@myhearts.org"; $headers3="Bcc: carmella@hotmail.com"; $headers3.=", sally@hotmail.com"; $headers3=$allleadersemails; $mymessage="Dear Leaders, <ul><BR> Just a note to let all know that we have $numberleaders Hem Leaders available to take e-clients. <BR> If you are a Hem Leader, could you please consider setting your account to accept a Hem client?<BR> There are no clients on a waiting list, so if you do set your account to Accept a Hem client, <BR> you may get a client in a day, or it could even be a week. <BR><BR> Thanks!</ul>"; $from="webservant@myhearts.org"; $fromemail="webservant@myhearts.org"; $mysubject="Leaders needed"; $to="webservant@myhearts.org"; $subject = $mysubject; $message=$mymessage; $headers1= 'MIME-Version: 1.0' . "\r\n"; $headers1.= 'Content-type: text/html; charset=iso-8859-1; Content-type: image/jpg' . "\r\n"; $headers='From: ' . $fromemail . "\r\n"; $headers.=$headers1 . $headers2 . "\r\n"; $headers.=$headers3 . "\r\n"; //Mail it mail($to, $subject, $message, $headers); // this lets it show on the page, so I can see what I sent out echo $mymessage;
  10. I don't run the server. So I make PHP pages, upload them and figure it out from there.
  11. Hi I am trying to ask MySQL for records that fall between dates like this: $FromDate='2008-01-01'; $ToDate='2008-02-15'; $query="SELECT * FROM orders WHERE datepaid BETWEEN $FromDate and $ToDate"; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; echo '<br>The resulting rows were '.$num.'<br>'; And I made sure there were dates in the database that do fall within that range. And the table field called "datepaid" is a "date" field in MySQL, not just a text field But I still come up with zero rows returned. I looked to see if there was a known bug for the BETWEEN statement and also tried WHERE datepaid>$FromDate and datepaid<$ToDate but that didn't work either. Any help is much appreciated!!!!!!! Thank you in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.