My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
PayPal  
Integrating with PayPal
Updated Sep 13, 2010 by subim...@gmail.com

Substruct

To enable PayPal do the following

  1. Visit the admin preferences page inside Substruct
  2. Select PayPal IPN from the Processor select box
  3. Enter in your PayPal email address. Password is not required for PayPal IPN.

PayPal Account Setup

Enable IPN

  1. Log into your PayPal account and go to Profile
  2. Click on "Instant Payment Notification Preferences"
  3. Click on Edit
  4. The URL should point to: http://yourserver/paypal/ipn

Testing With PayPal

  1. Ensure your site has a public-accessible URL, like http://dev.mystore.com
  2. Sign up for a PayPal Sandbox Account.
  3. Set your site to be in "test mode" from the Substruct admin preferences page.
    • This will automatically point the PayPal URL to the developer sandbox.
  4. Use your Sandbox "seller account" email address in the Substruct admin preferences.
  5. Set up the proper PayPal IPN address inside the Sandbox "seller account"

After this is all complete, you should be able to make purchases with your Sandbox "buyer account".

Comment by edelsons...@gmail.com, Jul 24, 2008

I've gotten paypal integration setup, but the email functionality is not quite working. Can anyone give me a quick overview of how they got their SMTP stuff all set up and configured? I tried using my gmail account and accessing gmail's free SMTP server without any luck :(

Comment by alanom...@gmail.com, Aug 17, 2009

It appears the PayPal return URL for after the order is complete is defined by Substruct as yourcheckouthost/store/finish_order, which overrides and therefore makes it unnecessary and redundant to set the return URL via your PayPal profile.

However, I cannot find where Substruct sets this return URL. I've tried several code searches and tracing through the whole checkout process. Can anyone help? I have a necessarily unusual server setup and need to reconfigure this. Thanks!

Comment by JonT...@gmail.com, Aug 17, 2009

alanomaly-- I don't believe you are correct in that assumption.

Substruct sets the url that the user is returned to after submitting the PayPal information. The user submits a form to PayPal from within the Substruct app containing hidden fields with all of the relevant order data. The user is then redirected to the url set by the hidden field with the name "return" (see vendor/plugins/substruct/app/views/store/_paypal_cart.rhtml) which happens to be the item you're trying to find. It is necessary to set the URL on your PayPal account because PayPal then does a postback to the server, hitting the paypal controller at /paypal/login. That postback is what Substruct then checks to verify that the payment has indeed been confirmed by PayPal.

However, you might not want to edit that item because it returns to the finish_order action which then updates the status of the order in the DB (or you can implement this functionality in your own action... just a note).

More information on PayPal !IPN is here

Comment by alanom...@gmail.com, Aug 18, 2009

Thanks! Not sure how I missed _paypal_cart.rhtml. I did mean the user return URL, which is overridden, I wasn't trying to contradict the instructions. Post intended as general info, not a correction.

Thanks for the step-by-step run through, exactly what I'd been looking for!

Powered by Google Project Hosting