vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to retrieve IP address from IPN (https://vborg.vbsupport.ru/showthread.php?t=189894)

vb_mp 09-03-2008 05:36 AM

How to retrieve IP address from IPN
 
Hi,

I am in the process of integrating the IDevAffiliate affiliate management system with my paid subscription ( getting some help from the owner of IDevAffiliate).

In order for it to work, I need to retrieve the customer IP address once payment has been safely processed.

Can someone please tell me how I can get the IP address?

Thanks,

John

Marco van Herwaarden 09-03-2008 12:27 PM

You can use the constant IPADDRESS.

vb_mp 09-03-2008 12:44 PM

Hi Marco,

The constant IPADDRESS is set when payment is completed?

Thanks,

John

Dismounted 09-04-2008 06:39 AM

IPADDRESS is set in init.php - which all vBulletin files run before anything else.

vb_mp 09-04-2008 07:08 AM

Thanks Dismounted.

What happens in a scenario where a user pays for monthly subscription and it gets processed via IPN. One month later, PayPal triggers subscription payment again and it goes to vbulletin IPN. Does the IPADDRESS constant get initialized to the IP address that was initially used for this payment ( perhaps retrieved from database or passed from PayPal)?

John

Marco van Herwaarden 09-04-2008 08:02 AM

No, that would probably give the IP of PayPal. I don't think the IP that initiated the recurring payment is stored. Also the user could be on a different IP a month later. For what reason you need this original IP?

vb_mp 09-04-2008 08:11 AM

Apparently idevaffiliate requires IP address for recurring payments - to assign the commission to the correct affiliate when the recurring payment occurs (kind of stupid). It is what their tech has told me.

I have sent them an inquiry... to check this.

But, on another note... a month later the user won't be there right? The recurring payment will be done automatically and does not need the user's approval.

John

Marco van Herwaarden 09-04-2008 09:03 AM

That is the whole problem it seems. The user doesn't initiate the recurring payment, so there is no current IP for that user. I don't see how you can ever solve that.

vb_mp 09-04-2008 09:43 AM

Hm, I was hoping the first time the payment happens, the IP address gets saved in the vbulletin db somewhere.

On recurring payment ( the automatic one ), I could perhaps pull the IP address from the db based on transactionId perhaps.

Marco van Herwaarden 09-04-2008 10:17 AM

You could probably create a small plugin that will store the ip-address in the subscriptionlog table when the subscription is created. You could then use this stored IP on the recurring payment. It would not really be usefull though, as the user mightbe using a different ip by this time.


All times are GMT. The time now is 03:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01553 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete