Jump to content
Harald Ponce de Leon

PayPal App for osCommerce Online Merchant

Recommended Posts

Comparing all the ...->_app->log(... calls in Frozen, it looks like ext/modules/payment/paypal/express.php on line 281 is missing a sixth parameter: ,(OSCOM_APP_PAYPAL_PS_STATUS == '1') ? 'live' : 'sandbox' . Is that the only fix needed, or are there more? Can someone with a PayPal setup try it out?

Share this post


Link to post
Share on other sites
2 hours ago, MrPhil said:

Comparing all the ...->_app->log(... calls in Frozen, it looks like ext/modules/payment/paypal/express.php on line 281 is missing a sixth parameter: ,(OSCOM_APP_PAYPAL_PS_STATUS == '1') ? 'live' : 'sandbox' . Is that the only fix needed, or are there more? Can someone with a PayPal setup try it out?

would that not be EC for express rather than PS for standard?


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

In ext/modules/payment/paypal/express.php on line 281 I changed

$paypal_express->_app->log('EC', 'CallbackResponse', 1, $log_sane, $params);

to

$paypal_express->_app->log('EC', 'CallbackResponse', 1, $log_sane, $params, OSCOM_APP_PAYPAL_EC_STATUS);

This gave me the missing CallbackResponse in the PayPal log an got rid of the error messages in system logs


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites
Posted (edited)

Couldn't edit my post

In ext/modules/payment/paypal/express.php on line 281 I changed

$paypal_express->_app->log('EC', 'CallbackResponse', 1, $log_sane, $params);

to

$paypal_express->_app->log('EC', 'CallbackResponse', 1, $log_sane, $params, (OSCOM_APP_PAYPAL_EC_STATUS == '1') ? 'live' : 'sandbox');

This gave me the missing CallbackResponse in the PayPal log an got rid of the error messages in system logs.

The 7th argument would be for IPN which could be set true but has default false.

I was able to edit this post

Edited by 241
previous answer was not full

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

Hello,

 

I need to locate the correct function in file that really confirms that the payment is confirmed.

 

/modules/payment/paypal_standard.php:

function verifyTransaction($pptx_params, $is_ipn = false) {

Is this enough? After the tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); ?

 

Best regards

Share this post


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

Hello,

 

I need to locate the correct function in file that really confirms that the payment is confirmed.

 

/modules/payment/paypal_standard.php:

function verifyTransaction($pptx_params, $is_ipn = false) {

Is this enough? After the tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); ?

 

Best regards

What do you actually want to achieve?

That method records that the payment has been verified, it doesn't do the verification.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Something like a callback, so when the paypal payment is confirmed, I send a cURL request with the invoice to my e-printer.

Share this post


Link to post
Share on other sites
27 minutes ago, sinopia said:

Something like a callback, so when the paypal payment is confirmed, I send a cURL request with the invoice to my e-printer.

In that case, you could put it in that method and it will get run when the payment is confirmed.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

@BrockleyJohn but which one?

if ( $result == 'VERIFIED' ) {

or

function verifyTransaction?

I think it's accessed twice from standard_ipn.php and paypal_standard..

Share this post


Link to post
Share on other sites
On 7/8/2019 at 3:11 PM, sinopia said:

@BrockleyJohn but which one?

if ( $result == 'VERIFIED' ) {

or

function verifyTransaction?

I think it's accessed twice from standard_ipn.php and paypal_standard..

Yes one is executed on receiving an IPN, the other in checkout_process if the customer comes back to the site. If you put it in the definition of function verifyTransaction it will always get executed.

If you only ever want it to get executed once, then you might have to do some extra work.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

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

×