pear:packages:payment_process2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
pear:packages:payment_process2 [2009/02/26 00:39] – Documentation clockwerxpear:packages:payment_process2 [2009/05/06 07:09] clockwerx
Line 26: Line 26:
  
 ===== Implementing a driver ===== ===== Implementing a driver =====
 +You need to implement two classes and some unit tests.
 +
 +The first is ''Payment_Process2_YourDriver'', which should implement all of the methods in the interface''Payment_Process2_Driver''.
 +
 +The second is ''Payment_Process2_Result_YourDriver'', which should implement all of the methods in the interface''Payment_Process2_Result_Driver''.
 +
 +The interface documentation should provide more detail on this.
  
 ===== Testing a driver ===== ===== Testing a driver =====
Line 69: Line 76:
 } }
 </code> </code>
 +
 +
  
 ===== Roadmap ===== ===== Roadmap =====
Line 75: Line 84:
   * <del>Swap to PHP5, HTTP_Request2</del>   * <del>Swap to PHP5, HTTP_Request2</del>
   * <del>Swap to Interfaces as needed</del>   * <del>Swap to Interfaces as needed</del>
 +  * <del>Dropping Paycom/Epoch driver</del> Dropped
 +    * Support people won't give access to test environment
 +    * doconnor has mailed other open source projects which provide paycom drivers to see if he can get test data
 +  * <del>Swap to Exceptions as needed</del> Done.
 +
 +
 +
 +==== 0.2.0 ====
 +  * Add a new driver for an Australian Bank (Payment_Process2_ANZ) ((needs clearing))
 +  * <del>Add a new driver for Paygea (Payment_Process2_Paygea)</del> Licences
 +  * Fix protected / public properties - dbezborodow
   * Unit test coverage (mocked out) for all drivers   * Unit test coverage (mocked out) for all drivers
     * Running into problems here with many providers     * Running into problems here with many providers
-      * TrustCommerce seems helpful, speaking to support people, rpeake helping lots!+      * TrustCommerce - simple coverage done.
       * Paypal - TBA       * Paypal - TBA
-      * Transfirst - TBA +      * Transfirst - asking original author 
-      * Linkpoint uses DTA((A popular german banking xml format)), so [[pear::packages:payment_dta]] / [[mschutte]] might be able to help+      * Linkpoint - TBA
       * Bibit - TBA       * Bibit - TBA
       * AuthorizeNet - TBA       * AuthorizeNet - TBA
-    * Lots of failures, errors and E_NOTICEs from existing drivers+    * <del>Lots of errors and E_NOTICEs from existing drivers</del> 
 +    * <del>Lots of</del> Some failures in test coverage 
 +    * Test coverage is not extensive!
     * Need to improve the test case loaders and what have you     * Need to improve the test case loaders and what have you
-  Dropping Paycom/Epoch driver +    <del>Swap to class constants.</del> 
-    * Support people won't give access to test environment +=== API changes === 
-    * doconnor has mailed other open source projects which provide paycom drivers to see if he can get test data+Anything which used 
 +<code php> 
 +PAYMENT_PROCESS_SOMETHING_CONSTANT 
 +</code> 
 +will be  
 +<code php> 
 +Payment_Process2::SOMETHING_CONSTANT 
 +</code>
  
 +Also; setPayment() is now a lot more angry about things.
  
 +Finally; Payment_Process2_Type::isValid() doesn't exist anymore.
  
 +==== 0.3.0 ====
 +  * <del>Add ANZ driver</del>
 +  * Fix typeMapping concept
 +  * Fix cvvCode concept in results
 +  * Use reflection where appropriate
 +<code php>
 +<?php
  
-==== 0.2.0 ==== +$process Payment_Process2::factory('ANZ')
-  * Add a new driver for an Australian Bank (Payment_Process2_ANZ) ((needs clearing)+$process->setLogin('Damo'); 
-  * <del>Add a new driver for Paygea (Payment_Process2_Paygea)</del> Licences+$process->setPassword('secret');
  
-==== 0.3.0 ==== +$cc Payment_Process2_Type::factory('CreditCard'); 
-  * Swap to Exceptions as needed+$cc->setType(Payment_Process2_Type_CreditCard::MASTERCARD); 
 +$cc->setCardNumber('5123456789012346'); 
 +$cc->setExpDate('05/2011'); 
 +$cc->setCvv('123'); 
 + 
 +$action Payment_Process2_Action::factory($process, 'Normal'); 
 +$action->setPayment($cc); 
 +$action->setOrderInfo('123432'); 
 +$action->setTransactionReference('123432/1'); 
 + 
 +$result $process->process($action); 
 + 
 +/* 
 + 
 +Responsibilities: 
 + 
 +  Processor: 
 +    Knows the endpoint, prepares the request from data. 
 +    Knows credentials. 
 +    Has a translator for the action types. 
 +    Has a translator for the base fields such as credentials. 
 +    Has a process() method that: 
 +      Passes response data into a Result and call the parser method. 
 +      Returns the Result. 
 + 
 +  Action: 
 +    Has a translator for the data 
 +    Prepares data. 
 + 
 +  Translator: 
 +    Very generic. Is never extended so that we don't litter 
 +      the class tree; instead, we set up the translator in 
 +      constructor methods. 
 + 
 +  Result: 
 +    Has a parser that transforms the response into data that is given to it 
 +      by the processor. 
 +    Has a translator for the result data. 
 + 
 +*/ 
 +</code>
  
          
pear/packages/payment_process2.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1