Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MV Order Number vs Cybercash Order-ID (Got Something)



******    message to minivend-users from OTR Comm <otrcomm@wildapache.net>     ******

Hello,

I do not know anything about the [cybercash-response] UserTag (I am very
new to Minivend), but I do know how to get any of the return values from
the CyberCash transaction.

I wanted to get the CyberCash reference code (ref-code), so I modified
the 'sub cyber_charge' in Order.pm to return it into the stream.

First I added:

...
   ($POPref, $tokenlistref ) =
                doDirectPayment( $sendurl, \%paymentNVList );
                                
   %tokenlist = %$tokenlistref;
   $result{MStatus}    = $POPref->{'pop.status'};
   $result{MErrMsg}     = $POPref->{'pop.error-message'}; 
   $result{'order-id'} = $POPref->{'pop.order-id'};
                                
-> ## Added by Murrah Boswell-2/26/2000
-> $result{'ref-code'} = $POPref->{'pop.ref-code'};
...

then I added:

...
   $Vend::Session->{cybercash_id} = $result{'order-id'};
                        
-> ## Included by: Murrah Boswell-2/26/2000  
-> $Vend::Session->{cybercash_ref_code} = $result{'ref-code'};
...

and finally, I changed the return value of sub cyber_charge to:

-> return ($result{'order-id'},$result{'ref-code'});

Now I can get the CyberCash transaction reference code by:

     CC REF CODE: [data session cybercash_ref_code]

You can get any of the other CyberCash transaction code the same way.

I have never written a UserTag, so I would not know how to grab all this
data into one, but this works fine.

I do have one question Mike (if you read this) or anyone else, after I
made these changes, when I restart Minivend I get the following:

bash: /root/.bashrc: Permission denied
Sent TERM to server on PID 2025.
MiniVend server stopped.
Subroutine GetQuery redefined at /usr/local/minivend/lib/CCLib.pm line
108.
Subroutine Clean redefined at /usr/local/minivend/lib/CCLib.pm line 121.
Subroutine Browser redefined at /usr/local/minivend/lib/CCLib.pm line
129.
Subroutine GetHash redefined at /usr/local/minivend/lib/CCLib.pm line
331.
CyberCash module found (CyberCash 2).
CyberCash module found (CyberCash 3).
MiniVend V3.14-5
Configuring catalog photoflashbacks...Alias /cgi-bin/photoflashbacks
used a second time, skipping.
done.
Configuring catalog simple...Alias /cgi-bin/simple used a second time,
skipping.
done.
Configuring catalog store...Alias /cgi-bin/store used a second time,
skipping.
done.
MiniVend server started in INET and UNIX mode(s) (process id 2044)

What I wonder about are the redefinitions of the routines in CCLib.pm? 
It does not appear to have any adverse effect, the transactions still go
through, I was just wondering what it means?

Thanks for Minivend,
Murrah Boswell
otrcomm@wildapache.net

Mike Heins wrote:
> 
> ******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******
> 
> Quoting Christopher Thompson (ct@arborinternet.com):
> >
> > I asked about the status of the [cybercash-response] UserTag a while back,
> > but got no answer. Does anyone know the status if this UserTag? It could
> > be used to return values from the CyberCash transaction. I would assume
> > that you could then use the CyberCash order ID rather than the order
> > counter for the order number.
> 
> I would think it would work in MV4, possibly not in 3.14. It all just
> depends on setting a hash with the CC results. I *think* I posted something
> called cybercash-response, I assume it would have been something as simple as:
> 
> UserTag cybercash-response Order parameter
> UserTag cybercash-response PosNumber 1
> UserTag cybercash-response Routine <<EOR
> sub {
>         my ($param) = @_;
>         return $Vend::Session->{cybercash_result}{$param} || '';
> }
> EOR
> 
> However, that is a bit unneeded, for with MV4 you can get it directly like:
> 
> Transaction ID: [calc] $Session->{cybercash_result}{'pop.txn-id'};    [/calc]
> Auth Code:      [calc] $Session->{cybercash_result}{'pop.auth-code'}; [/calc]
> AVS:            [calc] $Session->{cybercash_result}{'pop.avs_code'};  [/calc]
> 
> --
> Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH  45056
> phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>
> 
> I have a cop friend who thinks he ought be able to give a new ticket;
> "too dumb for conditions".
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: