Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Posts posted by Jonathon

  1. Hi Larry,

     

    When you say you can't use it, really. What do you mean? I know that when I turned it on a lot of my ajax request fails, this lead me to using things like:

     

     

    var token = '<?php echo Yii::app()->request->csrfToken; ?>';
    

     

    and sending it along with the CHtml::ajax data parameter.

    • Upvote 1
  2. Well I keep getting 400 errors in my Stripe response back and in the application log: 

     

    [error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.

     

    I feel like i'd sorted this the other day and it was because I was only accessing my site from my own  IP address. I will get back to you if it doesn't resolve itself.

     

    Thanks

     

    Jonathon

  3. Hi Larry,

     

    Just wondered if I could get your thoughts on the best way to offer a user to update a credit card with Stripe. I plan to let Stripe handle everything really. So I never touch or handle any credit card information. I'm going to be using subscriptions. Which is great using checkout, I let Checkout take the information, Stripe creates the customer and assigns them to my plan and bills them each interval.

     

    But how then would you suggest is the most user friendly way to allow someone to edit card details?

     

    Also, out of interest, what web hooks do you look for with your site or do you just send the whole webhook regardless what it is to yourself?

     

    Jonathon

  4. No problem, once you come to a decision, could you just reply to this thread as if you aren't going to do one i'll look into doing it myself. I did have bash with Lucene but Zend is at v2 now and most the articles of integration with Lucene are for v1.

     

    Thanks 

     

    Jonathon

  5. Hi Larry,

     

    Is your plan still to incorporate Elastic Search into Yii in one of the chapters? I know you were leaning to this some time ago. 

     

    PS - Integrated Stripe, it was fairly painless. Seems to be working ok. Thanks for your series and segment in the book on it.

     

    Jonathon 

  6. Good question, I had a similar question on here but in terms of it being through Yii. 

     

    A follow up question on a slight tangent, Larry, when you say:

     

     


    Yes. I'd also add: never store a database primary key value in a cookie.

     

    I would therefore take it that you wouldn't advocate using a url parameter in Yii such as

     

    user/profile/1 - with 1 being the user's primary key? 

     

    Or do you say that because the cookie can be altered?

  7. Hi Larry

     

    If you want to offer 3 paid subscription plans on a site, say basic, standard, advanced. A user chooses one of these and pays every interval, say a month.

     

    Can you use Checkout to accept the payment and then attach the customer to a plan?

     

    If not, would I have to you create a form, accept the payment, subscribe the customer to the plan?

     

    Thanks

     

    Jonathon

  8. Ok thanks Larry. I might look at going down this route. I know that it used to have a fairly large performance hindrance. But now, I see many sites using it exclusively. I'm guessing that you wouldn't have any idea of the top of your head as to why I am losing my urlRefferer and Flash messages when a HTTPS page redirects to a HTTP one. I can work around this either way so it's no trouble. But out of interest.

  9. I was thinking about this, maybe I should just go for all SSL pages. My flash messages worked fine before I put a couple of HTTPS pages in. I'm also having the issue with urlRefferer from HTTPS to HTTP, in the fact that it returns NULL if accessed from a HTTPS page. I have had a look about to see why I might be losing the data from urlRefferer or the flash messages. But I couldn't work it out.

  10. Hi Larry,

     

    I have some pages that are served over HTTPS, would I need to alter my config settings for sessions at all would you think?

     

    I thought of doing this? But I wasn't actually sure

    'session' =>array(
    'cookieParams' => array(
    'secure'=>true,
    ),
    

    On a related note, I saw this post http://stackoverflow.com/questions/441496/session-lost-when-switching-from-http-to-https-in-php and I believe that it might be the reason some of my flash messages don't work when I'm switching between HTTPS and HTTP pages. What would you advise in order to stop this? Do I need to set the sessionName explicitly in the config file?

     

     

    Jonathon

×
×
  • Create New...