- //end submit_transaction
-
- /**
- * @param int $recurringProfileID
- * @param int $processorID
- *
- * @throws Exception
- */
- public function getRecurringTransactionStatus($recurringProfileID, $processorID) {
- if (!defined('CURLOPT_SSLCERT')) {
- CRM_Core_Error::fatal(ts('PayFlowPro requires curl with SSL support'));
- }
-
- /*
- * define variables for connecting with the gateway
- */
-
- //if you have not set up a separate user account the vendor name is used as the username
- if (!$this->_paymentProcessor['subject']) {
- $user = $this->_paymentProcessor['user_name'];
- }
- else {
- $user = $this->_paymentProcessor['subject'];
- }
- //$recurringProfileID = "RT0000000001";
- // c $trythis = $this->getRecurringTransactionStatus($recurringProfileID,17);
-
- /*
- *Create the array of variables to be sent to the processor from the $params array
- * passed into this function
- *
- */
-
- $payflow_query_array = array(
- 'USER' => $user,
- 'VENDOR' => $this->_paymentProcessor['user_name'],
- 'PARTNER' => $this->_paymentProcessor['signature'],
- 'PWD' => $this->_paymentProcessor['password'],
- // C - Direct Payment using credit card
- 'TENDER' => 'C',
- // A - Authorization, S - Sale
- 'TRXTYPE' => 'R',
- 'ACTION' => 'I',
- //A for add recurring
- //(M-modify,C-cancel,R-reactivate,
- //I-inquiry,P-payment
- 'ORIGPROFILEID' => $recurringProfileID,
- 'PAYMENTHISTORY' => 'Y',
- );
-
- $payflow_query = $this->convert_to_nvp($payflow_query_array);
- echo $payflow_query;
- $submiturl = $this->_paymentProcessor['url_site'];
- //ie. url at payment processor to submit to.
- $responseData = self::submit_transaction($submiturl, $payflow_query);
- /*
- * Payment successfully sent to gateway - process the response now
- */
-
- $result = strstr($responseData, "RESULT");
- $nvpArray = array();
- while (strlen($result)) {
- // name
- $keypos = strpos($result, '=');
- $keyval = substr($result, 0, $keypos);
- // value
- $valuepos = strpos($result, '&') ? strpos($result, '&') : strlen($result);
- $valval = substr($result, $keypos + 1, $valuepos - $keypos - 1);
- // decoding the respose
- $nvpArray[$keyval] = $valval;
- $result = substr($result, $valuepos + 1, strlen($result));
- }
- // get the result code to validate.
- $result_code = $nvpArray['RESULT'];
- print_r($responseData);
-
- //RESPMSG=Invalid Profile ID: Invalid recurring profile ID
- //RT0000000001
- }