Answers.Body: <p>Okay, I've just done a civix install using the <a href="https://docs.civicrm.org/dev/en/master/extensions/civix/" rel="nofollow noreferrer">developer guide</a> and managed to get it done using the latest code formats. Things I did was:</p>
  
  <ul>
  <li><p>Migrated the files to CRM/Core/Payment/...</p></li>
  <li><p>Created a mgd file which automatically inserts the payment processor into the db.</p></li>
  <li><p>Fix errors/warnings encountered during testing.</p></li>
  </ul>
  
  <p>Sample upgrade <a href="https://github.com/jitendrapurohit/nz.co.fuzion.paystation/commit/78492b39efc40332841570e96c77df907b7aea3a" rel="nofollow noreferrer"><code>commit - Link</code></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-10T21:16:51.390Z
Answers.Text: This handles the change for new 4.7 installs, but for sites upgrading from 4.6 to 4.7, it currently [seems it may be necessary to disable the extension before upgrade](http://civicrm.stackexchange.com/questions/18081/is-upgrade-possible-for-payment-type-extension). Which means modifying contribute pages, etc :(
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-29T04:57:29.087Z
Answers.LastActivityDate: 2017-03-29T06:55:41.153Z
Answers.LastEditDate: 2017-03-29T06:55:41.153Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>After fixing some notices/warnings, I was quite able to configure and enable this processor on the contribution page.</p>
  
  <p>When using this on a live page, I see an error after like</p>
  
  <pre><code>PHP Fatal error:  CRM_Contribute_Form_Contribution_Confirm::preProcess(): 
  The script tried to execute a method or access a property of an incomplete object. 
  Please ensure that the class definition &amp;quot;nz_co_fuzion_paystation&amp;quot; 
  of the object you are trying to operate on was loaded _before_ unserialize()
  gets called or provide a __autoload() function to load the class definition  
  in /Users/jitendra/src/civicrm/CRM/Contribute/Form/Contribution/Confirm.php 
  on line 323
  </code></pre>
  
  <p>I think as it doesn't actually follows the hierarchy CRM/Core/Payment/... this error is thrown. </p>
  
  <p>Any thoughts?</p>
  
  <p>Note:   <code>$this-&gt;paymentProcessor['object']</code> has a class named <code>__PHP_Incomplete_Class</code> though it contains the paystation object.</p>
  
  <p>I cloned it from <a href="https://github.com/eileenmcnaughton/nz.co.fuzion.paystation" rel="nofollow noreferrer">https://github.com/eileenmcnaughton/nz.co.fuzion.paystation</a></p>
  
Tags: <civicontribute><extension><payment-processor>
Title: Upgrade Paystation processor to 4.7 compatible
ThreadText: # Upgrade Paystation processor to 4.7 compatible
  
  (Asked by: username_0 on 2017-03-28)
  
  After fixing some notices/warnings, I was quite able to configure and enable this processor on the contribution page.
  
  When using this on a live page, I see an error after like
  
  ```
  PHP Fatal error:  CRM_Contribute_Form_Contribution_Confirm::preProcess(): 
  The script tried to execute a method or access a property of an incomplete object. 
  Please ensure that the class definition &quot;nz_co_fuzion_paystation&quot; 
  of the object you are trying to operate on was loaded _before_ unserialize()
  gets called or provide a __autoload() function to load the class definition  
  in /Users/username_0/src/civicrm/CRM/Contribute/Form/Contribution/Confirm.php 
  on line 323
  
  ```
  
  I think as it doesn't actually follows the hierarchy CRM/Core/Payment/... this error is thrown.
  
  Any thoughts?
  
  Note: `$this->paymentProcessor['object']` has a class named `__PHP_Incomplete_Class` though it contains the paystation object.
  
  I cloned it from <https://github.com/eileenmcnaughton/nz.co.username_0.paystation>
  
  **Tags:** civicontribute, extension, payment-processor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-03-29. Score: 1 | Accepted answer
  
  Okay, I've just done a civix install using the [developer guide](https://docs.civicrm.org/dev/en/master/extensions/civix/) and managed to get it done using the latest code formats. Things I did was:
  
  * Migrated the files to CRM/Core/Payment/...
  * Created a mgd file which automatically inserts the payment processor into the db.
  * Fix errors/warnings encountered during testing.
  
  Sample upgrade [`commit - Link`](https://github.com/jitendrapurohit/nz.co.username_0.paystation/commit/78492b39efc40332841570e96c77df907b7aea3a)
  
  > **Comments:**
  > **username_1**: This handles the change for new 4.7 installs, but for sites upgrading from 4.6 to 4.7, it currently [seems it may be necessary to disable the extension before upgrade](http://civicrm.stackexchange.com/questions/18081/is-upgrade-possible-for-payment-type-extension). Which means modifying contribute pages, etc :(  
  
  ---
  
  