Magento Forum

   
Page 1 of 2
How do I test the Paypal (Website Payments Pro) Sandbox Api? 
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Hey Everyone,
I’d like to test out the Paypal Direct API, I’ve set up a Sandbox account, configured the API details and did a test order. But upon submitting a Test Order, instead of forwarding to the “Order Success” page, it submits the order then just stays on the checkout screen. Is this because it’s a Sandbox Account? Or is something not right?

I DO have a Live Paypal API for Website Payments Pro as well, but I’m hesitate to try that since it’s a Live account.  How do you test Sandbox out efficiently?  I followed the screencast and made sure all the details were correct, but is there something else I’m missing?

Any advice would help! Thanks.

Btw, this Magento .13700

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

@NickL: in Firebug / Console, could you paste contents of Response tab for last Ajax request when the problem happens?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Ok here’s the Firebug response.. its a mouthful..

POST from .../checkout/onepage/saveOrder/ (781ms)

<pre>
<strong>Notice:</strong> <i>Undefined index:  short_message</i> in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Paypal/Model/Direct.php</strong> on line <strong>73</strong><br>[0] in <strong>Mage_Paypal_Model_Direct->onOrderValidate</strong>(Mage_Sales_Model_Order_Payment) in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Sales/Model/Order.php</strong> on line <strong>433</strong><br>[1] in <strong>Mage_Sales_Model_Order->processPayments</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Sales/Model/Order.php</strong> on line <strong>61</strong><br>[2] in <strong>Mage_Sales_Model_Order->validate</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Checkout/Model/Type/Onepage.php</strong> on line <strong>301</strong><br>[3] in <strong>Mage_Checkout_Model_Type_Onepage->saveOrder</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Checkout/controllers/OnepageController.php</strong> on line <strong>217</strong><br>[4] in <strong>Mage_Checkout_OnepageController->saveOrderAction</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php</strong> on line <strong>325</strong><br>[5] in <strong>Mage_Core_Controller_Varien_Action->dispatch</strong>("saveOrder") in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php</strong> on line <strong>149</strong><br>[6] in <strong>Mage_Core_Controller_Varien_Router_Standard->match</strong>(Zend_Controller_Request_Http) in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Front.php</strong> on line <strong>166</strong><br>[7] in <strong>Mage_Core_Controller_Varien_Front->dispatch</strong>() in <strong>/home/kmg/public_html/shop/app/Mage.php</strong> on line <strong>380</strong><br>[8] in <strong>Mage::run</strong>("base") in <strong>/home/kmg/public_html/shop/index.php</strong> on line <strong>28</strong><br>
</pre><pre>
<strong>Notice:</strong> <i>Undefined index:  long_message</i> in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Paypal/Model/Direct.php</strong> on line <strong>73</strong><br>[0] in <strong>Mage_Paypal_Model_Direct->onOrderValidate</strong>(Mage_Sales_Model_Order_Payment) in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Sales/Model/Order.php</strong> on line <strong>433</strong><br>[1] in <strong>Mage_Sales_Model_Order->processPayments</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Sales/Model/Order.php</strong> on line <strong>61</strong><br>[2] in <strong>Mage_Sales_Model_Order->validate</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Checkout/Model/Type/Onepage.php</strong> on line <strong>301</strong><br>[3] in <strong>Mage_Checkout_Model_Type_Onepage->saveOrder</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Checkout/controllers/OnepageController.php</strong> on line <strong>217</strong><br>[4] in <strong>Mage_Checkout_OnepageController->saveOrderAction</strong>() in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php</strong> on line <strong>325</strong><br>[5] in <strong>Mage_Core_Controller_Varien_Action->dispatch</strong>("saveOrder") in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php</strong> on line <strong>149</strong><br>[6] in <strong>Mage_Core_Controller_Varien_Router_Standard->match</strong>(Zend_Controller_Request_Http) in <strong>/home/kmg/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Front.php</strong> on line <strong>166</strong><br>[7] in <strong>Mage_Core_Controller_Varien_Front->dispatch</strong>() in <strong>/home/kmg/public_html/shop/app/Mage.php</strong> on line <strong>380</strong><br>[8] in <strong>Mage::run</strong>("base") in <strong>/home/kmg/public_html/shop/index.php</strong> on line <strong>28</strong><br>
</pre>{"error”:true,"success”:false,"error_messages":[": “]}

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

@NickL: please try overwriting app/code/core/Mage/Paypal/Model/Direct.php with attached file.

File Attachments
Direct.php  (File Size: 3KB - Downloads: 358)
 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Ok that gave me the Javascript Popup saying:

Unknown Paypal API ERROR

So I double checked the Sandbox API Details again.. copied and pasted from Paypal Developer Central.. and Still Not working.  I got the Unknown Paypal API ERROR again.

The Sandbox Flag is CHECKED in the Paypal Configuration, and NO proxy details are listed…

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

in app/code/core/Mage/Paypal/Model/Direct.php line 75, update

$message __("Unknown PayPal API error");
with
$message __("Unknown PayPal API error: %s"$e['code']);
maybe we can find something on google about this code..

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Ok..

The Error returned was Paypal API Error: 0

Error 0???

Maybe i just can’t use Paypal API… i’ll keep searching on google for this.

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

In your database there should be table paypal_api_debug.
Are there any records?
If yes, is response_body not empty?
If yes, is there any information about possible problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

I do have the Paypal_api_debug..

Within the Response_body for Today’s error’s I do see data. It has some API details I’ve PM’ed to u.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Hey, Still working on debugging this.

Is there any reason that the error code isn’t reporting? It still says Error Code: 0. I’ve tried it with 3 different Sandbox API Details. (Signatures/Usernames).

Usually it’ll return a certain error code # ? Is there something else I may have missed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
derbbre
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2007-10-14
 

Not sure if I should start another post for this…
I’m getting a different error: “Invalid Configuration: This transaction cannot be processed due to an invalid merchant configuration.” in a JS pop-up.

I have triple-checked the Sandbox API Credentials. I haven’t tried the above patches as I’m not sure it’s the same problem.

Any ideas?

UPDATE—OOPS! My bad, shoulda Googled first.
This was my deal within my PayPal sandbox acct. I didn’t realize I had to agree to the Websites Payment Pro within the sanbox account… Sorry for the erroneous post.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Guru
 
Avatar
Total Posts:  307
Joined:  2007-08-31
London, UK
 

I am getting the unknown paypal error also - anbody??

 
Magento Community Magento Community
Magento Community
Magento Community
 
basedesignsffs
Member
 
Avatar
Total Posts:  31
Joined:  2007-12-18
 

I am getting this error aswell, I have no idea how to debug it either…

When using paypal direct I get ‘Unknown Paypal API error: 0’ after pressing place order.

When using paypal express as soon as I click the paypal express button inside ‘My Cart’ it redirects to the home page… no errors, nothing.

Any idea what is going on?

edit: I am developing on my local windows machine by the way.. that could make a difference I suppose.

edit 2: Sometimes when going to ‘My Cart’ theres a message saying ‘There was an error connecting to the Paypal server: ‘ it seems to be missing the error it gave..

 
Magento Community Magento Community
Magento Community
Magento Community
 
dminor
Jr. Member
 
Avatar
Total Posts:  24
Joined:  2007-12-13
 

I am testing with a LIVE paypal pro account and getting the “unknown paypal API error: 0” message also.

any ideas?? has anyone successfully tested with paypal pro?

 
Magento Community Magento Community
Magento Community
Magento Community
 
basedesignsffs
Member
 
Avatar
Total Posts:  31
Joined:  2007-12-18
 

any progress? I isntalled magento to my centOS dedicated server instead of testing on my local windows machine and I’m still getting the ‘Unknown paypal api error: 0’ error. baffling! it must be a problem with magento..

 
Magento Community Magento Community
Magento Community
Magento Community
 
basedesignsffs
Member
 
Avatar
Total Posts:  31
Joined:  2007-12-18
 

cmon people this is a huge issue! does anybody have paypal actually working?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2