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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

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.