89
89
* ie - all other amounts will return a failed response.
90
90
*
91
91
* -----------------------------------------------------------------------------------------------
92
- ** /
92
+ */
93
93
class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
94
94
# (not used, implicit in the API, might need to convert?)
95
95
const CHARSET = 'UTF-8 ' ;
@@ -102,15 +102,16 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
102
102
*/
103
103
static private $ _singleton = NULL ;
104
104
105
- /**********************************************************
105
+ /**
106
+ * *******************************************************
106
107
* Constructor
107
108
*
108
109
* @param string $mode
109
110
* The mode of operation: live or test.
110
111
*
111
- * @param $paymentProcessor
112
+ * @param int $paymentProcessor
112
113
*
113
- * @return \CRM_Core_Payment_eWAY *******************************************************
114
+ * *******************************************************
114
115
*/
115
116
public function __construct ($ mode , &$ paymentProcessor ) {
116
117
// require Standard eWAY API libraries
@@ -123,10 +124,12 @@ public function __construct($mode, &$paymentProcessor) {
123
124
$ this ->_processorName = ts ('eWay ' );
124
125
}
125
126
126
- /**********************************************************
127
+ /**
128
+ * *******************************************************
127
129
* This function sends request and receives response from
128
130
* eWAY payment process
129
- **********************************************************/
131
+ * *******************************************************
132
+ */
130
133
public function doDirectPayment (&$ params ) {
131
134
if (CRM_Utils_Array::value ('is_recur ' , $ params ) == TRUE ) {
132
135
CRM_Core_Error::fatal (ts ('eWAY - recurring payments not implemented ' ));
@@ -144,13 +147,13 @@ public function doDirectPayment(&$params) {
144
147
//------------------------------------
145
148
// create eWAY gateway objects
146
149
//------------------------------------
147
- $ eWAYRequest = new GatewayRequest ;
150
+ $ eWAYRequest = new GatewayRequest () ;
148
151
149
152
if (($ eWAYRequest == NULL ) || (!($ eWAYRequest instanceof GatewayRequest))) {
150
153
return self ::errorExit (9001 , "Error: Unable to create eWAY Request object. " );
151
154
}
152
155
153
- $ eWAYResponse = new GatewayResponse ;
156
+ $ eWAYResponse = new GatewayResponse () ;
154
157
155
158
if (($ eWAYResponse == NULL ) || (!($ eWAYResponse instanceof GatewayResponse))) {
156
159
return self ::errorExit (9002 , "Error: Unable to create eWAY Response object. " );
@@ -420,9 +423,11 @@ public function _checkDupe($invoiceId) {
420
423
return $ contribution ->find ();
421
424
}
422
425
423
- /*************************************************************************************************
426
+ /**
427
+ * **********************************************************************************************
424
428
* This function checks the eWAY response status - returning a boolean false if status != 'true'
425
- *************************************************************************************************/
429
+ * ************************************************************************************************
430
+ */
426
431
public function isError (&$ response ) {
427
432
$ status = $ response ->Status ();
428
433
@@ -432,9 +437,11 @@ public function isError(&$response) {
432
437
return FALSE ;
433
438
}
434
439
435
- /**************************************************
440
+ /**
441
+ * ************************************************
436
442
* Produces error message and returns from class
437
- **************************************************/
443
+ * *************************************************
444
+ */
438
445
public function &errorExit ($ errorCode = NULL , $ errorMessage = NULL ) {
439
446
$ e = CRM_Core_Error::singleton ();
440
447
@@ -447,14 +454,17 @@ public function &errorExit($errorCode = NULL, $errorMessage = NULL) {
447
454
return $ e ;
448
455
}
449
456
450
- /**************************************************
457
+ /**
458
+ * ************************************************
451
459
* NOTE: 'doTransferCheckout' not implemented
452
- **************************************************/
460
+ * ************************************************
461
+ */
453
462
public function doTransferCheckout (&$ params , $ component ) {
454
463
CRM_Core_Error::fatal (ts ('This function is not implemented ' ));
455
464
}
456
465
457
- /********************************************************************************************
466
+ /**
467
+ * *****************************************************************************************
458
468
* This public function checks to see if we have the right processor config values set
459
469
*
460
470
* NOTE: Called by Events and Contribute to check config params are set prior to trying
@@ -467,10 +477,8 @@ public function doTransferCheckout(&$params, $component) {
467
477
*
468
478
* returns string $errorMsg if any errors found - null if OK
469
479
*
470
- ******************************************************************************************
480
+ * *****************************************************************************************
471
481
*/
472
- //function checkConfig( $mode ) // CiviCRM V1.9 Declaration
473
- // CiviCRM V2.0 Declaration
474
482
public function checkConfig () {
475
483
$ errorMsg = array ();
476
484
0 commit comments