*
* @package CRM
* @author Michael Morris and Gene Chi @ Phase2 Technology <mmorris@phase2technology.com>
- * $Id$
- *
*/
require_once 'PayJunction/pjClasses.php';
+/**
+ * Class CRM_Core_Payment_PayJunction.
+ */
class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
- # (not used, implicit in the API, might need to convert?)
+ // (not used, implicit in the API, might need to convert?)
const CHARSET = 'UFT-8';
/**
$pjpgCustInfo->setEmail($params['email']);
- $billing = array(
+ $billing = [
"logon" => $logon,
"password" => $password,
"url_site" => $url_site,
"province" => $params['state_province'],
"postal_code" => $params['postal_code'],
"country" => $params['country'],
- );
+ ];
$pjpgCustInfo->setBilling($billing);
// create pjpgTransaction object
$expiry_string = sprintf('%04d%02d', $params['year'], $params['month']);
- $txnArray = array(
+ $txnArray = [
'type' => 'purchase',
'order_id' => $my_orderid,
'amount' => sprintf('%01.2f', $params['amount']),
'crypt_type' => '7',
'cavv' => $params['cvv2'],
'cust_id' => $params['contact_id'],
- );
+ ];
// Allow further manipulation of params via custom hooks
CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $txnArray);
$numRecurs = $params['installments'];
- $recurArray = array(
+ $recurArray = [
'dc_schedule_create' => $dc_schedule_create,
// (day | week | month)
'recur_unit' => $recurUnit,
'period' => $recurInterval,
'dc_schedule_start' => $dc_schedule_start,
'amount' => sprintf('%01.2f', $params['amount']),
- );
+ ];
$pjpgRecur = new pjpgRecur($recurArray);
return $params;
}
+
// end function doDirectPayment
/**
}
}
-
/**
* ignore for now, more elaborate error handling later.
* @param $response
* the error message if any
*/
public function checkConfig() {
- $error = array();
+ $error = [];
if (empty($this->_paymentProcessor['user_name'])) {
$error[] = ts('Username is not set for this payment processor');
}