Jump to content
Latest News: (loading..)
Harald Ponce de Leon

PayPal App for osCommerce Online Merchant

Recommended Posts

6 hours ago, lucsangel said:

Hi!

To correct it you simply need quotes around the offending constant in the original line where (int)OSCOM_APP_PAYPAL_TRANSACTIONS_ORDER_STATUS_ID is, like this

line 37:

      $ppstatus_query = tep_db_query("select comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$oID . "' and orders_status_id = '" . (int)'OSCOM_APP_PAYPAL_TRANSACTIONS_ORDER_STATUS_ID' . "' and comments like 'Transaction ID:%' order by date_added desc limit 1");

 

Note the 'OSCOM_APP_PAYPAL_TRANSACTIONS_ORDER_STATUS_ID' quotes.

That way the module will still work and you won't have to think about anymore - it is functional should you one day want Paypal but forgot what you did to make the warning disappear.

Hope this helps.

 

Bobbee
 

sorry Bobbee this is wrong and won't help anyone who uses it.

If you do this then it will always use a value of 0 even when the setting is set. So you will get rid of the warning but you won't be able to see any paypal orders in admin because there's no matching status value. If you put quotes round it then it's a string and not a constant (defined or otherwise).

The post you quoted was correct.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Recently I'm seeing a lot of 0.0.0.0 in the PayPal App log for customers ip address. Doesn't seem to be causing any payment problems but I'm curious what changed. Anyone else seeing this?


The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites

Using BS\Gold, lightly modified.

Am getting the " Could not start the procedure to download v5.011"  error message. 

Have changed all the $HTTP_  vars to new $_ vars.   Still have problem.

Share this post


Link to post
Share on other sites

Payment Ok,

I get these errors:

Warning: include(/home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/modules/PS/api/GetTransactionDetails.php): failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php on line 377

Warning: include(): Failed opening '/home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/modules/PS/api/GetTransactionDetails.php' for inclusion (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php on line 377

Fatal error: Uncaught Error: Call to undefined function OSCOM_PayPal_PS_Api_GetTransactionDetails() in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php:381 Stack trace:

#0 /home/xxxxxx/public_html/xxxxxx/includes/modules/payment/paypal_standard.php(605): OSCOM_PayPal->getApiResult('PS', 'GetTransactionD...', Array, 'live')
#1 /home/xxxxxx/public_html/xxxxxx/includes/modules/payment/paypal_standard.php(83): paypal_standard->pre_before_check()
#2 /home/xxxxxx/public_html/xxxxxx/includes/classes/payment.php(40): paypal_standard->__construct()
#3 /home/xxxxxx/public_html/xxxxxx/checkout_process.php(46): payment->__construct('paypal_standard')
#4 {main} thrown in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php on line 381

I think there is an error in the file path in file OSCOM_PayPal.php.

Line 377
         

 include(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/api/' . $call . '.php');


Folder "api"  install  patch -  includes/apps/paypal/api/

How can I fix this?


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
57 minutes ago, Fredi said:

Payment Ok,

I get these errors:

Warning: include(/home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/modules/PS/api/GetTransactionDetails.php): failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php on line 377

 

I believe the error message - that file isn't there! This is an honest-to-goodness bug in that the processing that should get executed when an IPN notification has not already arrived is not there.

The workaround is to turn on IPN.

I vaguely remember putting a suitable file together and raising a pull request for this but it was a couple of years and several hard drives ago. I will see if I can dig it out. It was probably a PR to Harald...

Basically, if the customer hits checkout_process.php before an IPN has arrived and validated the transaction, the module is supposed to use the pp API to check if it's dodgy or not.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

...actually looking at the code, maybe the fix was a change to line 605 in the payment module... will check


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
On 2/25/2019 at 4:59 PM, Fredi said:

Line 377
         

On 2/25/2019 at 4:59 PM, Fredi said:

include(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/api/' . $call . '.php');


Folder "api"  install  patch -  includes/apps/paypal/api/

Warning: include(/home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/modules/PS/api/GetTransactionDetails.php😞 failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxx/includes/apps/paypal/OSCOM_PayPal.php on line 377

The actual file path is:   includes/apps/paypal/api/GetTransactionDetails.php

I do not know how to correct this file path correctly. Line 377.  

include(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/api/' . $call . '.php');

The path in the file gives the wrong direction.

Thanks John.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Does anyone have any idea how to solve the problem?


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
1 hour ago, Fredi said:

Does anyone have any idea how to solve the problem?

Setting IPN up in the paypal account should make the problem go away but try this fix. In includes/modules/payment/paypal_standard.php change line 605 from

          $details = $this->_app->getApiResult('PS', 'GetTransactionDetails', array('TRANSACTIONID' => stripslashes($HTTP_GET_VARS['tx'])), (OSCOM_APP_PAYPAL_PS_STATUS == '1') ? 'live' : 'sandbox');

to

          $details = $this->_app->getApiResult('APP', 'GetTransactionDetails', array('TRANSACTIONID' => stripslashes($HTTP_GET_VARS['tx'])), (OSCOM_APP_PAYPAL_PS_STATUS == '1') ? 'live' : 'sandbox');

In other words, change the first parameter from 'PS' to 'APP'. I've been unable to find the fix that I tested before so please report back and let us know if this solves it.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Thanks Jhon!
I will try it


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×