Jump to:

113 Posts in 224 Topics by 53 members

Payments and Payment Gateway / APIs

SilverStripe Forums » Payments and Payment Gateway / APIs » members, paypal subscriptions and IPN

This is a forum for discussing SilverStripe can-do payments and their APIs / Gateways.

Moderators: martimiz, Sean, Normann, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2196 Views
  • CHD
    Avatar
    Community Member
    218 Posts

    members, paypal subscriptions and IPN Link to this post

    evening all,

    im currently working on a "listing" style website.
    users will be able to sign up and list their holiday homes/properties similar to what you see here: http://www.ownersdirect.co.uk/brazil-north-east-2bed.htm

    ideally, i plan to have users create a profile on my site, then subscribe with paypal to "publish" their listing.
    so far I have installed the "memberprofiles" module which i THIK will work fine. I will just add lots more fields to the members page, and a has_many for all of the property images.

    paypals subscription/recurring payments seems easy enough, i just need to tweak it all a little to get it working.

    basically i wondered if anybody has any experience at all with this? will the memberprofiles module be suffice? what about if my users have more than 1 property? will they have to create a profile for each one? (thats not ideal!)

    also, i was thinking of just listing the "profiles" in a loop on the front end to browse the property listings, and have the IPN write to the database with either a 0 or 1 for paid or unpaid, with an IF statement in the loop which queries the database, to ensure only paid listings are displayed.

    i have NO experience at all with subscriptions, or the best way to deal with listings like this, is any of the above feasible or am i way off the mark here for how this should be done....

    thanks in advance for any help you can share!

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: members, paypal subscriptions and IPN Link to this post

    nobody can help then?

    to update, I have the paypal subscription working fine now. when a user pays, paypal send the IPN and it all writes to the database fine.
    however, how do i query that database when listing the properties in the front end?
    it needs to lookup the table, and check the payment status, if its failed then the product/property should be marked as offline and not be listed on the site, it its all paid OK then it should be marked as live and be online...

    can anybody help with this part?

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: members, paypal subscriptions and IPN Link to this post

    What are you storing the data as? Are you storing it as a data object linked to a member profile? In that case just show that in the template. As for the listings just add them as a has_many-relationship to the member profiles if you haven't already.

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: members, paypal subscriptions and IPN Link to this post

    well, currently paypal is just writing the data to a table called "payments" it adds the username, email address and payment status etc.
    i need to find the best way to lookup the payment status when displaying the listings in the front end...

    can you point me in the right direction or how to setup the has_many correctly?
    thanks a lot!

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: members, paypal subscriptions and IPN Link to this post

    Umm yes and no. If you don't know how to setup a has_many-relationship then you really need to read the basic tutorials, they cover all of this. They're available here: http://doc.silverstripe.org/sapphire/en/. Pay special attention to chapter 5 about relationships. What you want to do is either add the paypal stuff directly to the member profile or add that as a has_one so that the paypal info gets connected to a member.

    I really recommend that you let them register on your site first and then sending them to paypal so you know who they are when you get the IPN data from paypal.

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: members, paypal subscriptions and IPN Link to this post

    cool thanks.
    yeah currently they register on my site, then use a paypal button to subscribe.
    the button grabs their username and passes it though to the payment process.

    i'll have good look at the tutorials on relationships then. thanks again.

    2196 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.