Index: uc_payflowpro.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_payflowpro/uc_payflowpro.module,v
retrieving revision 1.3
diff -r1.3 uc_payflowpro.module
132a133,177
>  * Hook Functions (Token)
>  ******************************************************************************/
> 
> /**
>  * Implements hook_token_values().
>  */
> function uc_payflowpro_token_values($type, $object = NULL, $options = array()) {
>   switch ($type) {
>     case 'order':
>       // Retrieve the transaction type
>       $values['payflowpro-txn-type'] = variable_get('uc_pg_payflowpro_cc_txn_type', 'auth_capture');
> 
>       $order = $object;
>       // Retrieve the orders payments
>       $payments = uc_payment_load_payments($order->order_id);
>       // If payments were returned for the order
>       if (is_array($payments)) {
>         // Loop through payments
>         foreach($payments as $payment) {
>           // Unserialize data stored for the payment
>           $payment->data = unserialize($payment->data);
>           // If the payment was created via the uc_payflowpro module
>           if ($payment->data['module'] == 'uc_payflowpro') {
>             // Set the 'order-txn-id' token
>             $values['payflowpro-pnref'] = $payment->data['pnref'];
>           }
>         }
>       }
>   }
> 
>   return $values;
> }
> 
> /**
>  * Implements hook_token_list().
>  */
> function uc_payflowpro_token_list($type = 'all') {
>   if ($type == 'order' || $type == 'payflowpro' || $type == 'ubercart' || $type == 'all') {
>     $tokens['order']['payflowpro-txn-type'] = t('Transaction type (i.e. Authorize Only, Authorize Capture, etc.) used by the PayPal PayFlow Pro gateway for credit card transactions.');
>     $tokens['order']['payflowpro-pnref'] = t('Transaction ID returned from the PayPal PayFlow Pro gateway for credit card transactions.');
>     return $tokens;
>   }
> }
> 
> /*******************************************************************************
222,225c267,272
<     $data = array();
<     $data['pnref'] = (string)$response->PNRef;
<     $data['authcode'] = (string)$response->AuthCode;
<     $data['result'] = (string)$response->Result;
---
>     $data = array(
>       'module' => 'uc_payflowpro',
>       'pnref' => (string)$response->PNRef,
>       'authcode' => (string)$response->AuthCode,
>       'result' => (string)$response->Result,
>     );
241,244c288,293
<     $data = array();
<     $data['pnref'] = (string)$response->PNRef;
<     $data['authcode'] = (string)$response->AuthCode;
<     $data['result'] = (string)$response->Result;
---
>     $data = array(
>       'module' => 'uc_payflowpro',
>       'pnref' => (string)$response->PNRef,
>       'authcode' => (string)$response->AuthCode,
>       'result' => (string)$response->Result,
>     );
