TOPIC:

Payment gateways 1 year 5 months ago #244136

  • Topic Author
  • Rokhi
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Thanks: 1
Ah! thanks!
BTW, in the forum search form, the category selector does not expand so is quite difficult to use.
prntscr.com/tbwp51

Please Log in or Create an account to join the conversation.

Payment gateways 1 year 5 months ago #244149

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Thank you for reporting this, I will fix it.
The template we got wasn't perfect, fixed a lot already but seems there are some more issues with it.

Please Log in or Create an account to join the conversation.

Payment gateways 1 year 4 months ago #245025

  • Topic Author
  • Rokhi
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Thanks: 1
I have come back to this but the before form code is now crashing the form.
It was working!
If I remove the polipay code block the form loads. I have tried trimming out everything but the first line:

if( JRequest::getVar('poli_return', '') == 'true' ){}

But that still crashes - I don't know what I've done but calling that function seems to be the problem.

any ideas?

Please Log in or Create an account to join the conversation.

Payment gateways 1 year 4 months ago #245026

  • Topic Author
  • Rokhi
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Thanks: 1
After calling the Poli init in the submit piece, what's the best way to trap and display errors in the curl call.
So if there's an error in setting vars used, we don't end up with blank page.

Please Log in or Create an account to join the conversation.

Last edit: Post by Rokhi.

Payment gateways 1 year 4 months ago #245047

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Hi,

if I want to be totally safe I usually wrap stuff like this
try{

  // actual code
}catch(Exception $e){
   // catch application exceptions
}catch(Error $e){
   // catch errors thrown by php functions and extensions
}

With this you should be able to cover this issue. This won't cover really significant errors like syntax errors but I think it should help on faulty curl responses.

Please Log in or Create an account to join the conversation.

Payment gateways 1 year 4 months ago #245062

  • Topic Author
  • Rokhi
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Thanks: 1
Sure. The problem is the form crashes when I use any of the code in the before form piece.

I trimmed it back to
if(JRequest::getVar('poli_return', '') == 'true'){
echo 'true';
}

and it still crashes ( even in a try/catch block)

so the top of the piece goes
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library


try{
if(JRequest::getVar('poli_return', '') == 'true'){
echo 'true';
}
}catch(Exception $e){
   // catch application exceptions
echo $e;
exit;
}catch(Error $e){
   // catch errors thrown by php functions and extensions
echo $e;
exit;

}

$db = JFactory::getDBO();//Get Database Object

//etc
It seems to be the jrequest call that's not working - but it was working last week and I don't know what I've done to break it.
If poli_return doesn't exist, that call should just return '' right?
Do I have to include some other library?

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!