Akopia Akopia Services

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

Re: [mv] How to submit an order automagically



******    message to minivend-users from cfm@maine.com     ******

On Sun, Apr 09, 2000 at 07:45:26PM +0200, Mats Andersson wrote:
> ******    message to minivend-users from "Mats Andersson" <Mats@brain.syh.fi>     ******
> 
> I'm trying to make a Minivend (3.14) to accept payment via an online 
> banking system.
> 
> I have figured out how to send all the relevant information to the 
> bank and get it returned and checked. I'm now able to determine if 
> there was a successful transaction at the bank.
> 
> When the user returns from the bank he goes to a homemade page in 
> pages/ord. There I have some Perl scripts that parses the return link 
> from the bank and does various checks on them.
> 
> Now on a successful check I would like Minivend to submit the order 
> and present the receipt.html page without user intervention.
> 

I'm guessing at what you mean "without user intervention".  If user is
just waiting online it's a vanilla minivend transaction.

Assuming you mean user runs a minivend session and makes a purchase, 
then goes off to other business, goes offline, etc... while your system 
does its thing and he is not expecting a receipt page on his browser:

We do this for a minivend-email gateway.  First POST the information 
to a minivend page.  That returns anything - it does not matter what 
in our case - as well as the all critical SESSION_ID.  We use that 
SESSION_ID for second POST with mv_final=1.  In your case you've 
already got the SESSION_ID from earlier interaction so you'd only need
the second POST.

use HTTP::Request::Common;
use LWP::UserAgent;

Get the session:
$_ =  $ua->request(POST 'http://your.catatlog.com/link/to/vlink.cgi/process', \@vals)->{_content};
print "$_\n";
Post the order:
print    $ua->request(POST $_, ['mv_doit' => 'refresh',
			   'mv_order_report' =>   'r/report',
			   'mv_order_profile' => 'final_by_email',
			   'mv_orderpage' => 'mv/receipt',
			   'mv_todo' => 'submit',
			   ])->{_content};

The final_by_email profile is [set] in the page &mv_final=1.

-- 

Christopher F. Miller, Publisher                             cfm@maine.com
MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
1.207.657.5078                                       http://www.maine.com/
Database publishing, e-commerce, office/internet integration, Debian linux.
-
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: