Membership Functionality III (Paypal Integration and IPN)

First, I did do a search and the post which closely resembles problems that I'm having was not answered: https://premium.wpmudev.org/forums/topic/membership-and-paypal-setup-help

Subscription Forms

Hi, I need to create a manual subscription form for the dynamic subscription ID that I've already created (see thread: https://premium.wpmudev.org/forums/topic/membership-functionality-ii-ipn-filters-and-drip-feeds) I have done so, however, it does not appear to work:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="sandboxaddress" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="item_name" value="Item Name" />
<input type="hidden" name="item_number" value="999100" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="a3" value="5.99" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<input type="hidden" name="return" value="http://website.com" />
<input type="hidden" name="cancel_return" value="http://website.com" />
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="notify_url" value="http://website.com/paymentreturn/paypalexpress" />
<input type="hidden" name="src" value="0" />
<input type="image" name="submit"border="0" src="http://website.com/img/5-99.png" alt="PayPal - The safer, easier way to pay online" />
  </form>

This form is pretty much identical, aside from the the recurring payments, to the one that is generated by the plugin. Through sandbox, I can successfully complete this transaction. Money is moved from my sandbox buyer account to my sandbox seller account. Unfortunately, absolutely nothing is found in "View Transactions."

I tested the IPN system using the tools offered by Paypal, and an IPN is recorded, but absolutely nothing is transferred besides the transaction ID and status. This is a huge problem. What do I do to rectify this situation?

Subscription Options

Is there a form I need to create for user's to set subscription options? Such as cancellations?

EDIT: Err, there was some sort of "Unable to view this page" message. Anyway, I forgot to select "Wordpress Membership" as the plugin I was having trouble with. Sorry!

  • dseason

    Haven't received a response, so I'm giving it a little bump.

    Here's what the database prints out from a transaction:

    transaction_ID 	transaction_subscription_ID 	transaction_user_ID 	transaction_sub_ID 	transaction_paypal_ID 	transaction_payment_type 	transaction_stamp 	transaction_total_amount 	transaction_currency 	transaction_status 	transaction_duedate 	transaction_gateway 	transaction_note 	transaction_expires
    1		0		0	0	53315228	NULL	0	0	USD	Completed	NULL	paypalexpress	 	NULL
  • dseason

    With this code:

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    	<input type="hidden" name="business" value="webmas_1299548710_biz@pxoink.net" />
    	<input type="hidden" name="cmd" value="_xclick-subscriptions" />
     	<input type="hidden" name="item_name" value="Four Weeks" />
      	<input type="hidden" name="item_number" value="999<?php print($user_id); ?>" />
    	<input type="hidden" name="currency_code" value="USD" />
    	<input type="hidden" name="a3" value="5.99" />
    	<input type="hidden" name="p3" value="1" />
    	<input type="hidden" name="t3" value="M" />
     	<input type="hidden" name="no_shipping" value="1" />
    	<input type="hidden" name="return" value="http://website.com/" />
    	<input type="hidden" name="cancel_return" value="http://website.com/" />
     	<input type="hidden" name="src" value="0" />
      	<input type="hidden" name="sra" value="1" />
      	<input type="hidden" name="srt" value="0" />
    	<input type="hidden" name="lc" value="US" />
    	<input type="hidden" name="notify_url" value="http://website.com/paymentreturn/paypalexpress" />
      	<input type="hidden" name="custom" value="999<?php print($user_id); ?>" />
    	<input type="image" name="submit"border="0" src="/img/5-99.png" alt="PayPal - The safer, easier way to pay online" />
      </form>

    (Note: without a custom field, it returns a 404.)


    Here I'm able to successfully complete a payment, IPN log shows that everything is Sent.


    This is what shows up in the recent transactions. Weird?

  • dseason

    Hi,

    Aaron helped me out and explained that the custom value holds all of the data:

    $custom = time() . ':' . $user_id . ':' . $sub_id . ':';
    $key = md5('MEMBERSHIP' . $amount);
    $custom .= $key;

    This is what is being populated in the database:

    transaction_id: 11
    transaction_subscription_id: 999115
    transaction_user_id: 115
    transaction_sub_id: 0
    transaction_paypal_id: 7BD10087VF596963D
    transaction_payment_type: NULL
    transaction_stamp: 1300224895
    transaction_total_amount: 599
    transaction_currency: USD
    transaction_status: Completed
    transaction_duedate: NULL
    transaction_gateway: paypalexpress
    transaction_note:
    transaction_expires: NULL

    However, it's not activating the subscription. Does this have to do with transaction_sub_id?

  • faufau

    Hi friends,

    I have one website having membership plugin and there is paid and free subscription, now i need blog details during registration so i have create code that i have put on free sunscription file code where custom message is printed :
    plugins\membership\membershipincludes\plugins\gateway.freesubscriptions file but i can't get the code for paypal express on gateway.paypalexpress.php file i think there is ipn setting done so where can i put that create blog code in 2nd file?

    in 1st file i have put code below this code: $content .= stripslashes($message);
    but where can i put in 2nd one file? or is it any way where io put the code after successful payment is done..?

    can ipn support on sandbox tesing mode? and i check it?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.