EllisLab text mark
Advanced Search
1 of 2
1
   
Simple Commerce Walkthrough
Posted: 05 March 2012 12:21 PM
Joined: 2011-02-18
196 posts

I don’t understand how to setup items through the Simple Commerce control panel. Do I simply add a channel titled subscriptions and then publish one entitled Basic and one entitled Pro…? Then choose them in the Add Item panel? Trying to understand why the channel is needed?

Stuff I’ve managed to figure out:
• Simple Commerce installed
• Simple Commerce Preferences Setup
• Sandbox accounts setup
• IPN setup + added to prefs

 
Posted: 06 March 2012 12:46 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hello

Thank you for posting your questions.

I would be happy to help you with the Simple Commerce Module.

The channel is going to hold your product details. You will set up your items and then use Add Item to bring the channel entry into the store. So the actual items are your channel entries.

Does that make sense? Please let me know if you need more clarification or if I can help you with anything else.

Cheers,

 Signature 

ExpressionEngine Support

 
Posted: 08 March 2012 04:41 PM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-06-18
42 posts

I am in about the same spot as thefifthlion. I set up a channel for the store items. Do I need a channel to store the purchase transactions or is that handled?

I assume I am to define a channel field for buy_now_url? Where do I get that URL from? I know how to get code for a button, but I am not seeing just a URL.

I set up sand box accounts and did a test transaction with a button. It looks like it works in PayPal, but the payment does not show in simple commerce. I feel like I’m missing something basic.

EDIT—————————-

Ok, I figured out how the buy_now_url works. I thought I need a URL from PayPal like you create a button.

I switched to live testing with small amounts on the recommendation from some forum posts. I have not been able to get the IPN to work. I have tried everything I have found so far in the forums. I did see one mention I did not understand. Does the IPN not work if the buyer pays by credit card and not sign into pay pal, or was that just with the sand box?

 Signature 

Bryan
http://www.duncanmccall.com

 
Posted: 09 March 2012 04:52 PM   [ # 3 ]   [ Rating: 0 ]
Joined: 2005-10-18
7343 posts

Hi Bryan,

I’m sorry you are having trouble with Simple Commerce and IPN. Did you see this User contribution in the User Guide?

If you’re having trouble with orders not being tracked, make sure that the PayPal Account you specify in the Simple Commerce settings is your primary PayPal email address. If you specify a secondary PayPal email address then transactions will always fail.

Can you verify your email settings with PayPal and let me know what you find out.

Cheers,

 
Posted: 09 March 2012 06:39 PM   [ # 4 ]   [ Rating: 0 ]
Joined: 2007-06-18
42 posts

Thanks for your help. That actually was the problem. I was using the Merchant ID number rather than the email address.

I have another question. When I was not getting IPN to work, I found another way to associate the payments with members by reading a post in the wiki—using a hard coded form to pass custom info.

This now works with IPN:

{exp:simple_commerce:purchase entry_id="34" success="artists/success/" cancel="artists/fee-payment"}

       
<h3>{item_name}</h3>

       <
p><strong>{item_sale_price}</strong></p>

 <
p><>Make Payment</a></p>

{/exp:simple_commerce:purchase} 

This works with PayPal but not the IPN:

{exp:simple_commerce:purchase entry_id="34" success="artists/success/" cancel="artists/jury-fee"}
<p>Fee: <strong>${item_sale_price}</strong></p>
<
form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<
input type="hidden" name="cmd" value="_xclick"/>
<
input type="hidden" value="http://yyy.com/yy/?ACT=23" name="notify_url"/>
<
input type="hidden" value="http://yyy.com/yy" name="return"/>
<
input type="hidden" value="http://yyy.com/yy" name="cancel_return"/>
<
input type="hidden" name="business" value="yyy@yyy.com"/>
<
input type="hidden" name="currency_code" value="USD"/>
<
input type="hidden" name="item_name" value="{item_name}"/>
<
input type="hidden" name="item_number" value="App {member_id}"/>
<
input type="hidden" name="upload" value="1"/>
<
input type="hidden" name="custom" value="{member_id}"/>  
<
input type="hidden" name="amount" value="{item_sale_price}"/>  
<
input type="hidden" name="quantity" value="1"/>  
<
input class="btn" type="submit" name="buy_now" id="buy_now_34" value="Pay Now">
</
form>
{/exp:simple_commerce:purchase} 

The returned values from the IPN debug email look almost identical, except for the stuff I am changing.

Is there something obvious I’m missing?

 Signature 

Bryan
http://www.duncanmccall.com

 
Posted: 09 March 2012 10:07 PM   [ # 5 ]   [ Rating: 0 ]
Joined: 2007-06-18
42 posts

Never mind, I was trying to be too clever. Trying to set a custom item number broke the link to the item in SC.

You can pass info to pay pal using the invoice field.

<input type=“hidden” name=“invoice” value=“1234”/>

 Signature 

Bryan
http://www.duncanmccall.com

 
Posted: 11 March 2012 01:38 PM   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-13
3807 posts

Bryan,

Sounds like everything is working now. Is there anything else I can assist you with?

Sean

 Signature 

web: Caffeine Creations twitter @CS_sean

 
Posted: 15 May 2012 11:25 AM   [ # 7 ]   [ Rating: 0 ]
Joined: 2011-02-18
196 posts

Shane/Dan,

Can you elaborate on your reply below?

So I’ve setup a channel named “subscriptions” and I’m wondering what to do next. Do I create field group/custom channel fields with basic stuff like name and description? And then set the simple commerce item variables through the add item settings? Just trying to figure out what’s needed in the custom fields?

  item_id
  item_name
  item_enabled
  item_purchases
  item_regular_price
  item_sale_price
  item_use_sale
  item_type

———————-

The channel is going to hold your product details. You will set up your items and then use Add Item to bring the channel entry into the store. So the actual items are your channel entries.

Does that make sense? Please let me know if you need more clarification or if I can help you with anything else.

Cheers,

 
Posted: 18 May 2012 04:52 PM   [ # 8 ]   [ Rating: 0 ]
Joined: 2005-10-18
7343 posts

Hi thefifthlion,

Sure thing!

Simple Commerce handles the transaction, pricing and sale management, etc.

Any descriptive information you want to keep about the items is managed in the channel as entries.

Does that help clarify?

Cheers,

 
Posted: 18 May 2012 04:55 PM   [ # 9 ]   [ Rating: 0 ]
Joined: 2011-02-18
196 posts

Do I need to setup the products on Paypal as well or is it that handled through the Simple Commerce item control panel? Was hoping to avoid redundancy.

 
Posted: 18 May 2012 05:26 PM   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2002-12-06
4784 posts

No,  you shouldn’t have to setup individual products in PayPal.

 Signature 

Get the missing EE2 owner’s manual - a complete guide to building an EE2 site.  It’s available in PDF or print.

 
Posted: 22 May 2012 04:21 PM   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hello thefifthlion,

Is there anything else we can help you with?

Cheers,

 Signature 

ExpressionEngine Support

 
Posted: 29 May 2012 11:29 AM   [ # 12 ]   [ Rating: 0 ]
Joined: 2011-02-18
196 posts

Hi Shane,

After wrestling with Paypal’s sandbox I managed to get it all working. When I open the Simple Commerce module in the control panel and view items I see a column that reads “Current Subscriptions.” I’m confused as to what this column/field represents? The “Purchases” column shows “1” but current subscriptions shows 0?

 
Posted: 30 May 2012 08:16 AM   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2002-12-06
4784 posts

SCM allows you to sell subscriptions as well as regular product.

 Signature 

Get the missing EE2 owner’s manual - a complete guide to building an EE2 site.  It’s available in PDF or print.

 
Posted: 30 May 2012 10:27 AM   [ # 14 ]   [ Rating: 0 ]
Joined: 2011-02-18
196 posts

Boyink,

First up, thanks for answering so many of my questions in the past.

When I add an item in Simple Commerce I simply set it to recurring and set the frequency to make it a subscription correct? I’m using the following code. It all seems to work yet in the control panel under the “items” view there is a column titled “Current Subscriptions” and it is empty. I’m just trying to figure out what that column is for. Is it the number of subscription periods that have elapsed? This would make sense since the column is empty.

{if item_type == "subscription"}
               
<p><>Subscribe Now</a></p>
       
{/if} 
 
Posted: 05 June 2012 02:12 PM   [ # 15 ]   [ Rating: 0 ]
Joined: 2011-02-18
196 posts

Dan / Shane,

Simple Commerce doesn’t register the subscription but does register the payment. Seems to be related to the bug at the link below but no one in thread has responded to my requests for assistance. One of the commenters suggests a 400 fix but doesn’t go into detail.

Can someone explain how to implement the 400 fix?

https://support.ellislab.com/bugs/detail/16607

—————
“responding with a 400 - rather than just ignoring the payment IPN for a subscription that doesn’t exist - corrects the problem for me.  Paypal correctly re-sends the payment IPN.”

 
1 of 2
1