eSensual Networks Forum Index
eSensual Networks
Support Forum
This topic is locked: you cannot edit posts or make replies.
Using PayPal
David
Site Admin

Joined: 31 Oct 2005
Posts: 15
Reply with quote
Using PayPal
__________________________________________________________________
Creating your Buy Now buttons

Login to PayPal and goto Merchant Services.
Find the Buy Now Buttons link and click on it.
Create a PayPal button for your site as you normally would but this time do not encrypt the button.

Now add 1 additional hidden form element to the button form called custom with a value of:
username::password

Which can be done with PHP like:
<input type="hidden" name="custom" value="<?=$_SESSION['member_user'].'::'.$_SESSION['member_pass']?>">

Example button form with hidden custom field:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="david@mynetwork.com">
<input type="hidden" name="item_name" value="Remote Consulting">
<input type="hidden" name="item_number" value="rc-20">
<input type="hidden" name="amount" value="20.00">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="hidden" name="custom" value="<?=$_SESSION['member_user'].'::'.$_SESSION['member_pass']?>">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

__________________________________________________________________
Setting Up PayPal Instant Payment Notification (IPN)

You must have a verified PayPal business account to use IPN.

Login to PayPal's panel and click on:
MyAccount->Selling Preferences->Instant Payment Notification Preferences

Set Notification URL to:
https://205.134.229.222/gateway/paypal.php?gateway_pass=xxxxxxxxxxxxxxxx&account_id=xxxxxx

Replace the xxx's with your correct gateway password and account id found in our Admin panel->MyAccount. Always use https when exposing your gateway password across the Internet.


__________________________________________________________________
Configure Our Gateway

You need to setup our gateway to recognize the IPN postback from PayPal.
Login to our admin panel and go to:
Users->Rebill

Click the Create New Rebill button.

Select PayPal IPN for the Processor.
Set Enabled.

Set Disable User On Refund if you want this event.
Set Disable User On Chargeback if you want this event.

Click Save Changes button

__________________________________________________________________
Testing PayPal

PayPal allows you to test the IPN thru a seperate test account you create at https://developer.paypal.com
Once you have created a test account, login and create two accounts in the sandbox.
One account to be the test merchant and the other to be a test buyer.
Setup the test merchant account IPN URL as you did above so our gateway will receive the test IPN postback.

You can either create another Buy Now button in the test merchant account or just hack the current Buy Now button. To do this you would change all URLs in the button form to point to the sandbox and also change the business hidden element to point to the test merchant account email address.

Other then that the form POST is the same.

After a successfull purchase, check that the IPN was received by our gateway by checking the user's account in our Admin panel to verify the amount has increased.
View user's profileSend private message
Using PayPal
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 This topic is locked: you cannot edit posts or make replies.