Jump to content
Larry Ullman's Book Forums

Necuima

Members
  • Content Count

    331
  • Joined

  • Last visited

  • Days Won

    5

Necuima last won the day on June 13 2017

Necuima had the most liked content!

Community Reputation

15 Good

About Necuima

  • Rank
    Advanced Member

Recent Profile Visitors

1069 profile views
  1. Hi Priyam, What script in Larry's book are you trying to use (and page number in the book)? Also see: https://www.w3schools.com/php/func_mysqli_num_rows.asp Necuima
  2. Hi Larry, This time it is me that is sorry re the delay in responding. I have just started changing over from Win 7 to Win 10 which is inhibiting my ability to test your proposed solution. I have a LOT of stuff on the Win 7 PC so am taking it very carefully - bit by bit - as I make the change to the (separate) Win 10 PC. Also am making the change from Windows Live Mail to Outlook and that's not as straight-forward as one might imagine especially as I want to migrate all my email storage folders over to Outlook. I will test your suggestion as soon as I can but it might be a couple of weeks before I can - and please accept my apologies for my tardiness. Cheers from Oz.
  3. Hi Larry, I can see the test charges now - they don't show in the dashboard until you capture them. Thanks as always for your insights. Cheers, Necuima
  4. Mmmm, I have the charge captured now but to be truthful I don't properly understand this. I retrieved the id from the response body: $charge__id = $charge->id; $charge = \Stripe\Charge::retrieve($charge__id); $charge->capture(); and the id is clearly not the token. So I hope that I am doing it correctly! A further query, I cannot see 'response_reason_text' in the log so maybe it is only there if the charge gets rejected? Again, any advice will be most appreciated. Thanks, Necuima
  5. Thanks to the advice received, I am making progress. I can send a charge for payment and receive confirmation that it is marked as 'paid'. But I have a puzzlement re page 518 re 'capturing charges'. Firstly, it seems that the charge_id is the token - is my understanding on this point correct? I used that anyway in the 'retrieve' statement and it did not object. (I am adapting Larry's code here for my own purposes, in fact a single charge). The '$charge->paid returns true which I test in my code and I can also see it in the Stripe test log. It does this whether I invoke the 'retrieve' and 'capture' statements or not. But the dashboard does not show any $s even though I have now sent dozens of charges all of which have returned true for paid. Any advice will be most appreciated and thank you in anticipation. Necuima
  6. Yes, I now have SSL enabled on my localhost XAMPP environment - thank you for the advice.
  7. It's OK - I tried \Stripe\Charge:: etc and that did not give the error. But now I have another error which seems to be associated with an SSL certificate. As mentioned I am trying to test this on localhost which, in my case, does not have an SSL certificate. I understood from a previous query on Stripe that I could test this from localhost without my XAMPP/Apache having an SSL certificate. Have I mis-understood this? The beginning of the error is: "An error occurred in script 'C:\xampp\htdocs\DMChat\modules\process_payment.php' on line 213: Stripe\Error\ApiConnection Object ( [message:protected] => Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 77]: error setting certificate verify ..............." This was from the catch block: catch (Exception $e) { // Try block failed somewhere else. trigger_error(print_r($e, 1)); } Again, your advice will be most appreciated, Necuima P.S., you can probably figure out that I am using your model/view/controller approach from the advanced book :-)
  8. Hi Larry, I am trying to use Stripe from my localhost and have established a test account with Stripe Australia. I am getting error "Class 'Stripe\Stripe_Charge' not found in .....on line 182 - I am on page 508 in the book. I have Stack-Overflowed and tried their solutions but none work. I am not able to use composer as I'm using PHP 5.5.3 on Windows 7 so I did the manual download and as far as I can tell all that is OK. Again, any advice will be most appreciated. Cheers, Necuima
  9. It's OK, I've found the issue. As my design does not follow yours exactly I need to add the additional data to the $_POST/form via hidden elements. Sorry to have bothered you. Necuima
  10. Hi Larry, I am trying to use STRIPE for the first time. I have set up a test account and that seems to be OK. I am adapting your form in billing.html but in a PHP script. The validation of my data via the ajax call to Stripe is OK as I am able to submit the form but when I check what data are received by my adaptation of your billing.php I can see the posted token but no form data. My form is attached. Can you see what I am doing wrong please? Thanks, Necuima
  11. I checked with the PHP manual and from PHP 7.2 the return from session_write_close() is a Boolean rather than a void. Might this require an update to the session code in the book? I tried just adding $rc = session_write_close() but I'm still getting the error. Thanks, Necuima
  12. Hi Larry, I have been using your database session handler for quite some time now in my Windows 7 environment but have run into a problem when I try to use it in a new PC set up with Windows 10 and Apache/PHP 7.3.7 (64 bit). I keep getting an error: "An error occurred in script 'C:\xampp\htdocs\....php' on line 53: session_write_close(): Session callback expects true/false return value" and I am getting this error everywhere that I have used 'session_write_close()' as per page 95 of the book (that's in dozens of places). Is it perhaps not needed in Win 10 with a fairly current Apache/PHP install? Or do I need to code it differently? Any advice will be most appreciated and thanks in anticipation.
  13. The backup and restore functionality is in Larry's book "PHP 5 Advanced", Chapter 10.
  14. I had the same problem and I found that I had the BASE_URL set incorrectly in module config.inc.php Once I fixed that the activation script ran OK.
×
×
  • Create New...