Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to configure Paypal Website Standard IPN in 0.7.15480? 
 
Vann
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-15
 

The latest Magento (ver. 0.7.15480) supports PayPal Website Standard. The blog shows a video demonstrating the process on the user end, but I haven’t found any instructions on configuring it properly on this here website.

I have found some suspiciously relevant looking fields on two of the configuration screens:

1. “System / Configuration / Paypal “:

Business Name       (set to our biz name as listed on Paypal)
Business Account    (set to Paypal login--an email address))
Sandbox Flag        (yes/no)
Debug Flag          (yes/no)

2. There’s more options under “System / Configuration / Payment Methods / PayPal Standard”:

Enabled       (true)
Title         (Paypal Standard)
Payment Action(tried both "Sale" and "Authorization")
Type          ("IPN")

If I set “Payment Action” to “Authorization”, this causes an error dialog to appear when “Place Order” is clicked on the user end: “Authorize action is not available.” “Sale”, on the other hand, causes a Magento page to appear with the header “Your order has been received”, indicating the order was placed, but without ever redirecting to Paypal. 

What might I be doing wrong?

To further baffle the uninformed, there’s a two whole other sets of options for Paypal Express, and Paypal Direct… whatever those are.

Any direction, fellahs?

Thanks,
Vann

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vann
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-15
 

Hey all.

It’s been a week since I posted this question, and I see no instructions, screencasts, blog entries, or forum posts on how to configure or use Paypal Standard.  Am I the only one curious about this? This seems like a strange way to announce a new feature! I’ve signed up for Paypal Website Payments Pro in the meantime.

Also, it’d be great if magento had some kind of logging feature built into the back end; the error “Authrozie action is not available” is not enough to go on to debug this solution without feedback from Magento.

-Vann

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@Vann: Admin > System > Configuration > PayPal > Website Payments Standard > Debug flag = “Yes”

then you can watch requests and responses in paypal_api_debug table.

 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

Hi Vann,

Please change the constant variable in app/code/core/Mage/Paypal/Model/Standard.php

const PAYMENT_TYPE_AUTH 'AUTHORIZATION';   //with all capital letter
const PAYMENT_TYPE_SALE 'SALE';

After that, please update your payment configuration again from admin.

From Paypal site , you need to turn on your IPN (profile -> Instant Payment Notification Preferences) and Auto return (profile -> Website Payment Preferences)

We will resolve the issue in the next release.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vann
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-15
 

Thanks for everyone’s feedback.

Moshe, I followed your instructions (being sure to set the Debug flag for my individual website and not just for the default Config).  The core_config_data table in the database indicates I properly set the config:

paypal/wps/debug_flag      1

No entries were posted in the paypal_api_debug table in the database when I placed orders.  I tried placing orders multiple times, before and after implementing Lindymagento’s changes, hence using both Sale/SALE and Authorization/AUTHORIZATION.  See the attachment of a listing of the empty paypal_api_debug table (a phpmyadmin screenshot).

--

Lindymagento, I followed your instructions. Indeed I checked the core_config_data table, and it shows that the config variable got updated as it presumably should:

payment/paypal_standard/payment_action      AUTHORIZATION

Now, there’s new behavior: Authorization now mimics that for Sale. That is, after Place Order is selected, the “Your order has been received” page appears, without redirecting to Paypal. See the attachment.

I appreciate the advice, but I’m no closer today. What do ya’ll suggest as next steps?

-Vann

Image Attachments
yourorderreceived.jpgphpymyadmin.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

After you added an item to the cart and login, can you please go to
http://yoursite.com/magento/index.php/paypal/standard/redirect
and then stop the browser before the url redirected to paypal.
Please view the page source. Can you see what data are posted to paypal?

For the current release, we only logged the data back from paypal via IPN.

If you want to log the data that posted to paypal, please put the following code in getStandardCheckoutFormFields method in app/code/core/Mage/Paypal/Mode/Standard.php

if ($this->getDebug() && $sReq{
           
foreach ($sArr as $k=>$v{
             $value 
=  urlencode(stripslashes($v));            
             
$sReq .= '&'.$k.'='.$value;
         
}
            $sReq 
substr($sReq1);
            
$debug Mage::getModel('paypal/api_debug')
                    ->
setApiEndpoint($this->getPaypalUrl())
                    ->
setRequestBody($sReq)
                    ->
save();
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Vann
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-15
 

I can see the HTML source from http://store.self-healing.org/index.php/paypal/standard/redirect :

<html><body>You will be redirected to paypal in a few seconds.
<
form action="https://www.paypal.com/cgi-bin/webscr" id="paypal_standard_checkout" name="paypal_standard_checkout" method="POST">
<
input id="business" name="business" value="orders@self-healing.org" type="hidden"/>
<
input id="return" name="return" value="http://store.self-healing.org/paypal/standard/success/" type="hidden"/>
<
input id="cancel_return" name="cancel_return" value="http://store.self-healing.org/paypal/standard/cancel/" type="hidden"/>
<
input id="notify_url" name="notify_url" value="http://store.self-healing.org/paypal/standard/ipn/" type="hidden"/>
<
input id="invoice" name="invoice" value="" type="hidden"/>
<
input id="currency_code" name="currency_code" value="USD" type="hidden"/>
<
input id="address_override" name="address_override" value="1" type="hidden"/>
<
input id="first_name" name="first_name" value="" type="hidden"/>
<
input id="last_name" name="last_name" value="" type="hidden"/>
<
input id="address1" name="address1" value="" type="hidden"/>
<
input id="address2" name="address2" value="" type="hidden"/>
<
input id="city" name="city" value="" type="hidden"/>
<
input id="state" name="state" value="" type="hidden"/>
<
input id="country" name="country" value="" type="hidden"/>
<
input id="zip" name="zip" value="" type="hidden"/>
<
input id="cpp_header_image" name="cpp_header_image" value="http://self-healing.org/images/stories/logo_solo.jpg" type="hidden"/>
<
input id="cmd" name="cmd" value="_ext-enter" type="hidden"/>
<
input id="redirect_cmd" name="redirect_cmd" value="_xclick" type="hidden"/>
<
input id="item_name" name="item_name" value="Self-Healing Research Foundation" type="hidden"/>
<
input id="amount" name="amount" value="0.00" type="hidden"/>
</
form><script type="text/javascript">document.getElementById("paypal_standard_checkout").submit();</script></body></html>

Interestingly, if I don’t stop the forward, it brings up an error-free Paypal payment page to our store—much like the one I imagine should appear when placing an actual order.

So I’d imagine the next step is to see what’s different with the request and response when actually placing an order. 

When I added the debug code to Standard.php (in order to log the request to paypal), loading the link that just worked above produces a “notice” about sReq not being defined. I set it equal to a “1” string to bypass the error, and the link above works again normally, and logs just a request to paypal_api_debug. No response is logged, obviously.

Yet, neither the request to paypal nor the response are logged when an order is actually placed. To be certain, I checked in core_config_data, that debug is still set to true:

1132      default      0      paypal/wps/debug_flag      1

Perhaps the getStandardCheckoutFormFields is not being called at all when an order is placed? I’ll continue to look around.

-Vann

 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

Please modify if statment as by removing “&& $sReq”

if ($this->getDebug()) {
 
....
}

After you changed the code and submitted the order, did you see the form data in paypal_api_debug table?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vann
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-15
 

right, nothing gets logged if i make that change. 

even if i replace all the getDebug() calls with “1"s in that stanrdard.php, nothing gets logged when i place a paypal order.

the request is logged, however, if i use the redirect url.

-vann

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bogie
Jr. Member
 
Total Posts:  4
Joined:  2008-03-12
 

vann, i am trying to solve the problem as well. i am using standard instead of pro.  adding my email which is on the paypal account in the business account yields me a different respones.  undefined.. dont know what that means but it is not asking for api… i went to paypal and you may have to get a api from magento to give to paypal under pro

 
Magento Community Magento Community
Magento Community
Magento Community
 
shrimphead
Jr. Member
 
Total Posts:  11
Joined:  2007-12-19
 

any update on this issue? facing the same prob…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top