Hi Jeoffrey, thank-you for your inquiry!
ASP is not usually a language that comes up because WordPress itself uses PHP, however according to this page this should work:
In order to work something with this, you should be using the forms within s2Member -> API / Notifications. You will notice that these forms use URLs to pass data to other places, and will not accept code such as you have above. Therefore, you will need to set up your ASP file to handle PHP $_GET variables.
Therefore, the correct way to set this up would be to put something to this effect in your Payment Notifications within API / Notifications.
http://www.yoursite.com/AddCredit.aspx/?revenue=%%amount%%&customerId=%%payer_email%%&uniqueId=%%subscr_id%%
Notice that you must use %%amount%% instead of %%initial%% within Payment Notifications.
Within your ASP file, you can use code to this effect to grab these values:
<%
revenue= Request.querystring("revenue")
customerId= Request.querystring("customerId")
uniqueId=Request.querystring("uniqueId")
'continue your query here
%>
Also, something you may want to keep in mind here,
Because you’re passing variables from one server to another, it could be possible to exploit this process. Be especially careful if you’re giving away services based on this routine. s2Member uses security features in it’s IPN / PDT from PayPal and it’s other payment gateways to verify the information it’s given by $_POSTing the data back to the site. You may need to do something similar in this situation if you’re worried about the validity of the payments that are given to this URL.
The easiest way to do this would be to post the data to another ASP/PHP file on the server you have s2Member installed on and make sure that the arguments given to your ASP file are correct.
I have replaced your URL with ‘mywebsite.com’ to help keep others from knowing your direct link.
I hope all of that makes sense, and if you have any further questions on this subject, feel free to ask in this topic. I will try to help you out as best as possible.
Also, if you would rather $_POST the data, or have it be more secure through a POST routine, you can hack into the IPN process and either use fopen() or cUrl to POST data to your ASP page. You can find info on hacking s2Member’s processes here: http://www.s2member.com/kb/hacking-s2member/
Let me know how it goes.
Best Regards,
-Bruce
-
This reply was modified 4 years, 8 months ago by
Bruce.