Jump to content

Problem with a class not clearing and fatal error


foreverdita

Recommended Posts

I have a code which loops through order numbers, gets the order auth id and submits the auth id to Payflow through curl.

 

I am requiring the payflow_curl once at the top of the page before looping through my orders.  The payflow_curl has a class declared called payflow, which includes all of the functions required to authorizecapture the order.

 

I then loop through my orders, submit a new payflow(authid) for each order and receive my response back from payflow.

 

The problem is that because the curl is required before the looping begins, the class is already declared and does not clear out - so it is bascially submitting the same auth id and receiving a duplicate response.

 

 

I tried putting my require file within the loop, which would most likely work except that I receive the fatal error:  Cannot redeclare class payflow.  Is there a way to clear the class and redeclare it?  I am not really familiar with classes to the extent that I can solve this problem on my own and I am hoping that someone can offer me some guidance.  Thank you much!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.