Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] PayOffline (Pro)


Guest

Recommended Posts

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

I figured out that it's something to do with tep_image

 

I made the following replacements, and I get barcodes! I'm not familiar enough with PHP or OSC to figure out why, although we are running PHP5:

 

Checkout_success.php

 

Replaced:

 

echo '<p align="center"><a href="'.tep_href_link(FILENAME_PAYOFFLINEPRO_PAYSLIP, 'oid='.$payofflinepro['oid'], 'SSL').'" target="_new">'.tep_image($payofflinepro['BarcodeURL'], 'PayOffline Barcode').'</a></p>';

 

with:

 

echo '<p align="center"><a href="'.tep_href_link(FILENAME_PAYOFFLINEPRO_PAYSLIP, 'oid='.$payofflinepro['oid'], 'SSL').'" target="_new">'."<img src='$payofflinepro[barcodeURL]' alt= 'PayOffline Barcode'>".'</a></p>';

 

 

And in Payofflinepro_payslip.php

 

echo '<p align="center">'.tep_image($details['BarcodeURL'], 'PayOffline Barcode').'</p>';

 

with:

 

echo "<center> <img src='$details[barcodeURL]' alt='PayOffline Barcode here'> </centre>";

Link to comment
Share on other sites

"Authenticate error" is the error sent back from the PayOffline server - check your username and secret key are correct (note the test and live modes have different codes)

Link to comment
Share on other sites

I found the cause and a solution to callbacks failing. What is happening is that although the PayOffline documentation states that the transaction id is string(255), they actually truncate it at 50 chars so when the callback is made it doesn't match the value in the db (which is the full length).

 

I have updated the module file to now only generate 50 character transaction ids for new transactions and when processing callbacks to only look at the first 50 chars in the db.

 

I'll upload the new module shortly.

 

Changed files are:

/payofflinepro_callback.php

/includes/modules/payment/payofflinepro.php

Link to comment
Share on other sites

  • 5 months later...

Hi Tom,

 

Wonder if you could help?

 

I have installed this module and ran a test transaction however it does not seem to get as far as checkout success. I get this instead.

 

Warning: require(fpdf/fpdf.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxxxx/pdfinvoice.php on line 21

Warning: require(fpdf/fpdf.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxxx/public_html/xxxxxxx/pdfinvoice.php on line 21

Fatal error: require() [function.require]: Failed opening required 'fpdf/fpdf.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxx/public_html/xxxxxg/pdfinvoice.php on line 21

 

The sale does go through I can see it in admin and on the simulator. But I cannot open the pdf invoice in admin either.

 

Any advice would be greatfully received

 

Chris

Better to be looked over than overlooked!

Link to comment
Share on other sites

This contribution doesn't use pdf files at all -from the above it look like you have a pdf invoice contrib installed and the two have clashed.

 

The error suggests that you are missing the file /fpdf/fpdf.php - I'd double check that this file exists and if not re uploaded it from the pdf contrib.

Link to comment
Share on other sites

I imagine that it is - you have a "fatal error" above and I suspect that occurs before the email is generated - once the fpdf problem is fixed the emails will probably start working

Link to comment
Share on other sites

Thanks Tom,

 

Great Contribs by the way. and many thanks for your help.

 

Chris

 

Hi. I get this error when trying to confirm payment.

 

 

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice 
in /home/xxxxxxx/public_html/xxxxxx/includes/application_top.php on line 144Fatal error: 

Cannot redeclare _sess_open() (previously declared 
in /home/xxxxxxx/public_html/xxxxxxxx/includes/functions/sessions.php:23)
in /home/xxxxx/public_html/xxxxx/includes/functions/sessions.php on line 23

 

This is during the checkout payment screen.

 

Any help would be most greatful.

Better to be looked over than overlooked!

Link to comment
Share on other sites

Those messages suggest to me that application_top.php is being included / required more than once though I couldn't say why. The payoffline does nothing special on the checkout_payment screen compared to other payment modules

Link to comment
Share on other sites

  • 1 month later...
Those messages suggest to me that application_top.php is being included / required more than once though I couldn't say why. The payoffline does nothing special on the checkout_payment screen compared to other payment modules

 

 

Tom,

 

Needle in a haystack I know but any idea which files I should be looking in? I have checked all the payment related files under catalog but could not find a call for application top twice in any file.

Edited by clrob11

Better to be looked over than overlooked!

Link to comment
Share on other sites

Hi Tom

 

I have Payoffline working and I have had my first real customer, and been paid!

 

But I can not get the callbacks to have any effect in my admin area

 

In test mode I get a 200 response OK message in the payoffline test area

 

In the payoffline live screen the callback errors counter is at zero, I did a test purchase in the live system and let it expire so if the callbacks were failing the counter should be at 4 or 5

 

In addition the barcodes do not appear in the email, they appear everywhere else they should

 

I am using RS2

 

My website is www.mhvideos.co.uk

 

Your help would be much appreciated

 

Martin

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

  • 8 months later...

Hi Tom,

 

I've changed host and my barcodes are not working now :-(

 

It doesn't show the barcodes on the Checkout_success.php or on the payofflinepro_payslip.php

 

The email is showing the barcode number, but not the actual barcode.

 

Regards, Tony

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...