Jump to content
Sign in to follow this  
perfectpassion

[Contribution] PayOffline (Pro)

Recommended Posts

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>";

Share this post


Link to post
Share on other sites

Hi

 

I have opened an account and installed the module but when i checkout i get the following error

 

MODULE_PAYMENT_PAYOFFLINEPRO_TEXT_ERROR

Authentication error

 

Any ideas what the problem might be?

Jason

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

ok Tom would this also be the reason I did not get an order email?


Better to be looked over than overlooked!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks Tom,

 

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

 

Chris


Better to be looked over than overlooked!

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
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

 

 

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!

Share this post


Link to post
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 Phoenix 1.0.4.3 on PHP 7.3

Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.4.0) here.

Share this post


Link to post
Share on other sites

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


Tony Lloyd - "Backbone of the Making Tracks Online Experience" - See GE Manual p19 :lol:

lloydy_sig.jpg

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
Sign in to follow this  

×