Latest News: (loading..)
Harald Ponce de Leon

PayPal App for osCommerce Online Merchant

185 posts in this topic

@moxamint u disabled IPN in your paypal setting? Or trying disabling PDT. Let's see how many emails you get.

Share this post


Link to post
Share on other sites
10 minutes ago, clustersolutions said:

@moxamint u disabled IPN in your paypal setting? Or trying disabling PDT. Let's see how many emails you get.

I have IPN on only.  PDT is off.  I am receiving 2 e-mails all the time - one from <<ext\modules\payment\paypal\standard_ipn.php>> and the other one from <<includes\modules\payment\paypal_standard.php>>.

Thanks, Eddy

Share this post


Link to post
Share on other sites

Try disabling IPN and use PDT? I use PDT ahd is working. One email. 

Share this post


Link to post
Share on other sites

Posted (edited)

@Moxamint, looking at the version of Paypal_standard I really don't think IPN is the way to go. Comment out the tep_mail() function in paypal_standard.php. You probably going to get one email now. But there is a bigger problem, and that your order is going through the "after" process twice. The processing codes in standard_ipn.php look more outdated. So I would suggest you go to PDT, and it is a very simple switch, and I know it works.

Should you really wanting to fix your issue. The tep_mail() in paypal_standard.php is in the before_process() method, and if you are using IPN, the before_process() method should not be called. In my paypal_standard.php file, I have these block of codes in the pre_before_check() method...there's the idea...track down how your before_process() method was called with IPN...the checkout_process.php calls the $payment->before_process() method...hope I did not confuse you.

 
// skip before_process() if order was already processed in IPN
      if ( $check['orders_status'] != OSCOM_APP_PAYPAL_PS_PREPARE_ORDER_STATUS_ID ) {
        if ( tep_session_is_registered('comments') && !empty($comments) ) {
          $sql_data_array = array('orders_id' => $order_id,
                                  'orders_status_id' => (int)$check['orders_status'],
                                  'date_added' => 'now()',
                                  'customer_notified' => '0',
                                  'comments' => $comments);

          tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
        }

// load the after_process function from the payment modules
        $this->after_process();

 

Edited by clustersolutions

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks.  I'll try using PDT only and see what happens.  Is <<checkout_process.php>> being called at all when using PayPal Standard?  <<standard_ipn.php>> redirect buyers to <<checkout_success.php>>, but in osC admin the PayPal Standard suggest that <<checkout_process.php>> must be used as the return URL.

Thanks, Eddy

Edited by Moxamint

Share this post


Link to post
Share on other sites

Hi there

I am very interested in this discussion

My IPN and PayPal standard works like this.

PDT is on 

IPN is on

If the IPN from PayPal reaches my site before/if the customer clicks and returns then stock is updated emails sent etc from by the IPN

If User clicks and returns and gets back faster then the IPN then PayPal standard takes people through to checkout success and all is updated sent etc.

However the email is sent by PayPal Standard in this case not checkout_process

For me it is one or the other. I tested it by having slightly different emails in IPN and PayPal standard and then in sandbox I would purchase and not return to the site.

1 email was sent from IPN  and then I return from PayPal to the site and no 2nd email was sent and stock was not wrongly updated as the IPN had done it.

I then did the opposite and sure enough the PayPal standard email was sent etc etc.

I have been told on here that this is not the case but on my site and in my testing it is what occurs and has been fro many years.

i also looked in the logs where i could see if the IPN was logged first or second and the corresponding emails matched up.

I use the latest PayPal app.  ( I have no idea what PDT does)

 

Share this post


Link to post
Share on other sites

@Moxamint , yeah, in my earlier post I had stated that PDT use checkout_process.php (you'd see the warning when you turn on PDT in the Paypal app, too). You need to make sure that you setup Paypal to return to your website after payment completion. The GET/POST strings are passed back to checkout_process.php, and at this line of code, "$payment->before_process()", it will go to paypal_standard.php's before_process() method to complete the order processing and checkout_success.php page. One email from the paypal_standard.php's before_process() method. And if you look at the order processing codes, you'll see the codes are more "fresh" in the paypal_standard.php vs. standard_ipn.php. 

13 hours ago, Moxamint said:

Thanks.  I'll try using PDT only and see what happens.  Is <<checkout_process.php>> being called at all when using PayPal Standard?  <<standard_ipn.php>> redirect buyers to <<checkout_success.php>>, but in osC admin the PayPal Standard suggest that <<checkout_process.php>> must be used as the return URL.

Thanks, Eddy

Share this post


Link to post
Share on other sites
12 hours ago, douglaswalker said:

PDT is on 

IPN is on

@douglas walker, I believe in the long run you should not use IPN. I would just disable IPN on Paypal and go get PDT working for some of those reasons I had stated above. I assume Paypal fires off either PDT or IPN and not both. I didn't have the time to test that theory. Based on what I saw in the codes, I imagine IPN may not be supported forever...

Share this post


Link to post
Share on other sites

 

From PayPal Developer Site

PDT has a major weakness: it sends order confirmations once and only once. As a result, when PDT sends a confirmation, your site must be running; otherwise, it will never receive the message.

With IPN, in contrast, delivery of order confirmations is virtually guaranteed since IPN resends a confirmation until your site acknowledges receipt. For this reason, PayPal recommends that you implement IPN rather than PDT.

Share this post


Link to post
Share on other sites
4 hours ago, douglaswalker said:

 

From PayPal Developer Site

PDT has a major weakness: it sends order confirmations once and only once. As a result, when PDT sends a confirmation, your site must be running; otherwise, it will never receive the message.

With IPN, in contrast, delivery of order confirmations is virtually guaranteed since IPN resends a confirmation until your site acknowledges receipt. For this reason, PayPal recommends that you implement IPN rather than PDT.

@douglaswalker, thx for the info. I didn't see that. I think the risk is the same as the server would go down during a non-paypal transaction checkout. To me, if it occurs, say 0.0001%, I am ok with it; otherwise, addressing server up time may be more pressing. To use IPN, I am sure that you need a code walk through. It seems not ready to me with the latest release... 

Share this post


Link to post
Share on other sites

@clustersolutions  Hi there,

the IPN with the latest ap works perfectly. (php 5.6) I have it on my site. The new ap is the best incarnation of it for years. 

Doug

Share this post


Link to post
Share on other sites

@clustersolution I turned off IPN and left PDT on.  Now I received only one e-mail from paypal_standard.php and the customer was redirected to checkout_success.php successfully.  However, while the order ID logged in the e-mail is 1060717418, the order ID logged in admin/orders is 1060717417.  I went to check my database, the order ID to be used for next order is 1060717418.  Also the order status stayed at Preparing [PayPal].  It never changed to Verify [PayPal].

I have no idea what's happening.  I guess my issues with PayPal APP is unique?

Thanks, Eddy

Share this post


Link to post
Share on other sites

@clustersolution Update: All info provided above was from my development site.  I just made a real purchase at my productive site (running on non-responsive osC 2.3.3.4) and everything including e-mail went through and logged correctly with IPN turned off and PDT turned on in my PayPal account.  If I remember correctly, the old osC only uses IPN.  So does PayPal code in osC simply ignore the setting in PayPal account???

Thanks, Eddy

Share this post


Link to post
Share on other sites

Posted (edited)

Hi there

weird

I have both PDT & IPN ON as recommended. All works as expected for me.

Have you made changes to PayPal Standard?

There should be a check in IPN and PayPal Standard to stop double logging and emails

Doug

Edited by douglaswalker

Share this post


Link to post
Share on other sites
On 7/30/2017 at 5:52 PM, douglaswalker said:

@clustersolutions  Hi there,

the IPN with the latest ap works perfectly. (php 5.6) I have it on my site. The new ap is the best incarnation of it for years. 

Doug

hey @douglaswalker, that wouldn't surprise me. There're just so many OSC variants out there that some may work, and some may not. Mine just happen not, and when I looked at the code I found my IPN order processing portion outdated and the PDT was the quickest route. 

Share this post


Link to post
Share on other sites

Yes I was very happy when it just worked out of the box for me. I remember in the early days (10 years ago) having a special version coded to get it all to work.. thankfully that is behind me now. (at least for a few weeks anyway):biggrin:

 

Share this post


Link to post
Share on other sites

@moxamint, I think if your objective is to get the latest Paypal app working with 2.3.4 or 2.4 I would just focus on that. I imagine which endpoint paypal calls on your site is depended on its setting (i.e. PDT or IPN). For your order id issue, check the console log.network, you should be able to see the posting strings. You probably need to disable checkout_process.php by adding a "die;' statement at the beginning. If the order id being passed back was correct, then the issue is probably lie somewhere in checkout_process.php and paypal_standard.php's before_process() method...that's how I incorporated CCVG order_total in it and getting PDT to work. I won't claim to be an expert with Paypal as I had a total of 8 hr of work in it in the past 15+ yrs. I just had to do it for the first time ever since for a small store that wanted to use a payment solution without upfront fee. I'll try to help when I can...

21 hours ago, Moxamint said:

@clustersolution Update: All info provided above was from my development site.  I just made a real purchase at my productive site (running on non-responsive osC 2.3.3.4) and everything including e-mail went through and logged correctly with IPN turned off and PDT turned on in my PayPal account.  If I remember correctly, the old osC only uses IPN.  So does PayPal code in osC simply ignore the setting in PayPal account???

Thanks, Eddy

Share this post


Link to post
Share on other sites

@Gergely@clustersolution@douglaswalker I confirm that my issue was introduced by the code change I made in checkout_process.php.  I did not know PayPal does use checkout_process.php, and the code change in it works for my bank payment option, so I never looked into it...  Thanks very much again for your help!

Best wishes, Eddy

Share this post


Link to post
Share on other sites

Yes it's now working without a hiccup!

Cheers, Eddy

douglaswalker likes this

Share this post


Link to post
Share on other sites
23 hours ago, Moxamint said:

@Gergely@clustersolution@douglaswalker I confirm that my issue was introduced by the code change I made in checkout_process.php.  I did not know PayPal does use checkout_process.php, and the code change in it works for my bank payment option, so I never looked into it...  Thanks very much again for your help!

Best wishes, Eddy

@moxamint, awesome, good to know!

Share this post


Link to post
Share on other sites

Installed the latest version of the app and it works great however I'm having problems getting "Order Administration: Capture full or partial authorizations, refund full or partial transactions" to work. Does anyone else have this working with the latest BS Edge version?  I see it uses web-hooks, does something need to be set up in the PayPal developer account to get the refunds to work?

Share this post


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

Installed the latest version of the app and it works great however I'm having problems getting "Order Administration: Capture full or partial authorizations, refund full or partial transactions" to work. Does anyone else have this working with the latest BS Edge version?  I see it uses web-hooks, does something need to be set up in the PayPal developer account to get the refunds to work?

Can you describe the problem further? Does the popup window appear with the input fields to enter the amount in? This is how they should function:

https://library.oscommerce.com/Package&en&paypal&oscom23&order_administration

Are errors being logged and displayed in the PayPal -> Log page?

Share this post


Link to post
Share on other sites

Posted (edited)

The details button performs as expected but when I click the refund button it just redirects me to the admin index.php page. No window pops up. Also, there is no Paypal tab on the top/tabbed interface. I only see the buttons (details,refund,view at paypal) on the bottom of the page.

 

Edited by crimble crumble

Share this post


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

The details button performs as expected but when I click the refund button it just redirects me to the admin index.php page. No window pops up. Also, there is no Paypal tab on the top/tabbed interface. I only see the buttons (details,refund,view at paypal) on the bottom of the page.

 

That definitely does not sound right. Could you provide a screenshot of how that page looks? Be sure to censor out any sensitive information.

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