Hi, I'm trying to configure Payment to be able to buy userpoints on a site. Points should be bought with a form (now trying with node forms, but could be webforms) and after payment, the same amount that has been payed should be points grated to the buying user. I have two doubts that I would like to see if someone could guide me because I'm not a very expert PHP developer:
- is there a "hook" where I can intercept the confirmation of payment and then "catch" the user-id and payed amount and add this amount as userpoints to that user?
- is it possible to be done with Rules? (I'm used to Rules in Drupal 7 but it's been difficult to see which is the best event and where are the right artguments)
I find very interesting the Payment platform and I'm surprised that anyone has still created a module to buy userpoints :-P That's a very basic feature on many sites where points could be used for buying products, services, or "abilities" that could be converted to some permissions within the site. Well, that's at least what I'm trying to do :-)
Thanks for any help!
Comments
Comment #1
xanohook_payment_status_change() can be used to respond to payment processing-related events. There is a Rules event as well.
Comment #2
jorditr commentedThanks.
Comment #3
xanoIf you publish a module that provides integration, please let me know, so I can add it to the list.
Comment #3.0
xanoSome corrections
Comment #4
alexd73 commentedHello!
How I can get the amount in Rules, and put it to Points fields?
http://i.imgur.com/BNhtzOh.png
Thenk you.