Index: uc_payflowpro.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_payflowpro/uc_payflowpro.module,v
retrieving revision 1.2.2.29
diff -r1.2.2.29 uc_payflowpro.module
197c197
<     'credit' => 'uc_payflowpro_charge',
---
>     'credit' => 'uc_payflowpro_process',
203c203,218
< function uc_payflowpro_charge($order_id, $amount, $data) {
---
> /**
>  * Handles processing credit card transactions.
>  *
>  * @param $order_id
>  *   Id of the order to process.
>  * @param $amount
>  *   Amount to process for the order.
>  * @param $data
>  *   Order data containing the transaction type.
>  *
>  * @return
>  *   Returns an array with the expected values for a gateway callback.
>  *
>  * @see hook_payment_gateway()
>  */
> function uc_payflowpro_process($order_id, $amount, $data) {
209c224
<   global $user, $response;
---
>   // Load the order.
212,213c227,256
<   $request = _uc_payflowpro_cc_sale_xml($order_id, $amount, $data);
<   $response = _uc_payflowpro_submit_xml($request);
---
>   // Perform the appropriate action based on the transaction type.
>   switch ($data['txn_type']) {
>     // Handle UC_CREDIT_AUTH_ONLY and UC_CREDIT_AUTH_CAPTURE transactions.
>     default:
>       return uc_payflowpro_charge($order, $amount, $data);
>   }
> }
> 
> /**
>  * Handles UC_CREDIT_AUTH_ONLY and UC_CREDIT_AUTH_CAPTURE transactions.
>  *
>  * @param $order
>  *   Reference of the order to process.
>  * @param $amount
>  *   Reference of the amount to process for the order.
>  * @param $data
>  *   Reference of the order data containing the transaction type to process.
>  *
>  * @return
>  *   Returns an array with the expected values for a gateway callback.
>  *
>  * @see hook_payment_gateway()
>  */
> function uc_payflowpro_charge(&$order, &$amount, &$data) {
>   global $user, $response;
> 
>   // Generate the credit card processing request.
>   $request = uc_payflowpro_cc_sale_xml($order, $amount, $data);
>   // Submit the credit card processing request and capture the response.
>   $response = uc_payflowpro_submit_xml($request);
483c526
<   $response = _uc_payflowpro_submit_xml($request);
---
>   $response = uc_payflowpro_submit_xml($request);
502c545
<     $response = _uc_payflowpro_submit_xml($request);
---
>     $response = uc_payflowpro_submit_xml($request);
607c650
<   $response = _uc_payflowpro_submit_xml($request);
---
>   $response = uc_payflowpro_submit_xml($request);
795c838
<   $response = _uc_payflowpro_submit_xml($request);
---
>   $response = uc_payflowpro_submit_xml($request);
868c911
<   $response = _uc_payflowpro_submit_xml($request);
---
>   $response = uc_payflowpro_submit_xml($request);
881,882c924,937
< // Submit request to PayFlow
< function _uc_payflowpro_submit_xml($xml, $mode = NULL) {
---
> /**
>  * Submit a credit card processing request.
>  *
>  * @param $xml
>  *   The XML formatted credit card processing request.
>  * @param $mode
>  *   Override the modules mode setting.
>  *   - test: Sends requests to the PayPal PayFlow Pro test server.
>  *   - live: Sends requests to the PayPal PayFlow Pro live server.
>  *
>  * @return
>  *   Return the credit card processing response.
>  */
> function uc_payflowpro_submit_xml($xml, $mode = NULL) {
973,975c1028,1035
< // Generates the common portion of the XML transaction request
< // Changed payflowpro_merchant to vendor
< function _uc_payflowpro_wrap_xml($transaction) {
---
> /**
>  * Wraps a credit card processing request with the common portion of the
>  * transaction request.
>  *
>  * @param $transaction
>  *   The credit card processing request to wrap.
>  */
> function uc_payflowpro_wrap_xml($transaction) {
998,999c1058,1064
< // Generates XML for the items list
< function _uc_payflowpro_items_xml($order) {
---
> /**
>  * Generates the items list section of a credit card processing request.
>  *
>  * @param $order
>  *   Reference of the order object to process.
>  */
> function uc_payflowpro_items_xml(&$order) {
1021,1022c1086,1092
< // Generate XML for Invoice section of request
< function _uc_payflowpro_invoice_xml($order) {
---
> /**
>  * Generates the invoice section of a credit card processing request.
>  *
>  * @param $order
>  *   Reference of the order object to process.
>  */
> function uc_payflowpro_invoice_xml(&$order) {
1051c1121
<   	$comment = implode('; ', $comment);
---
>     $comment = implode('; ', $comment);
1054c1124
<   	$comment = _uc_get_skus($order);
---
>     $comment = uc_payflowpro_get_skus($order);
1085c1155
< ' . _uc_payflowpro_items_xml($order) . '
---
> ' . uc_payflowpro_items_xml($order) . '
1094c1164,1170
< function _uc_get_skus($order) {
---
> /**
>  * Returns an array of SKUs from the order.
>  *
>  * @param $order
>  *   Reference of the order object.
>  */
> function uc_payflowpro_get_skus(&$order) {
1099d1174
<   return "SKUS: " . implode('|', $skus);
1100a1176
>   return "SKUS: " . implode('|', $skus);
1103,1107c1179,1190
< // Generate XML for credit card sale
< function _uc_payflowpro_cc_sale_xml($order_id, $amount, $data) {
<   $order = uc_order_load($order_id);
< 
<    // Get payment action (Sale or Authorization)
---
> /**
>  * Generates the credit card processing request.
>  *
>  * @param $order
>  *   Reference of the order object to process.
>  * @param $amount
>  *   Reference of the amount to process for the order.
>  * @param $data
>  *   Reference of the order data containing the transaction type to process.
>  */
> function uc_payflowpro_cc_sale_xml(&$order, &$amount, &$data) {
>   // Get payment action (Sale or Authorization).
1110,1113d1192
<   if (strlen($cc_exp_month) == 2) {
<     $cc_exp = $cc_exp_year .  $cc_exp_month;
<   }
< 
1116c1195
< ' . _uc_payflowpro_invoice_xml($order) . '
---
> ' . uc_payflowpro_invoice_xml($order) . '
1118c1197
< ' . _uc_payflowpro_cc_info_xml($order_id) . '
---
> ' . uc_payflowpro_cc_info_xml($order) . '
1123c1202
<   return _uc_payflowpro_wrap_xml($xml);
---
>   return uc_payflowpro_wrap_xml($xml);
1126,1128c1205,1211
< // Generate a credit card XML
< function _uc_payflowpro_cc_info_xml($order_id) {
<   $order = uc_order_load($order_id);
---
> /**
>  * Generates the credit card section of a credit card processing request.
>  *
>  * @param $order
>  *   Reference of the order object to process.
>  */
> function uc_payflowpro_cc_info_xml(&$order) {
1156c1239
< ' . _uc_payflowpro_invoice_xml($order) . '
---
> ' . uc_payflowpro_invoice_xml($order) . '
1169c1252
<   return _uc_payflowpro_wrap_xml($xml);
---
>   return uc_payflowpro_wrap_xml($xml);
1189c1272
<   return _uc_payflowpro_wrap_xml($xml);
---
>   return uc_payflowpro_wrap_xml($xml);
1200c1283
< ' . _uc_payflowpro_invoice_xml($order) . '
---
> ' . uc_payflowpro_invoice_xml($order) . '
1212c1295
<   return _uc_payflowpro_wrap_xml($xml);
---
>   return uc_payflowpro_wrap_xml($xml);
1268c1351
< ' . _uc_payflowpro_items_xml($order) . '
---
> ' . uc_payflowpro_items_xml($order) . '
1438c1521
<     $response = _uc_payflowpro_submit_xml($form_values['xml_code'], $form_values['mode']);
---
>     $response = uc_payflowpro_submit_xml($form_values['xml_code'], $form_values['mode']);
Index: includes/PayflowProRecurring.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_payflowpro/includes/PayflowProRecurring.class.php,v
retrieving revision 1.2.2.9
diff -r1.2.2.9 PayflowProRecurring.class.php
241c241
<       $response = _uc_payflowpro_submit_xml($xml_request, $this->mode);
---
>       $response = uc_payflowpro_submit_xml($xml_request, $this->mode);
