xiaofeng dou wrote:

>Hello, everyone
>       I am new to the tapestry. In my webapp, the user will pay money
>through external bank gateway(user will be navigated from my webapp to
>bank pages), after the pay , the external page will return to my
>webapp's page and send some parameters using post method. I want to
>know how the tapestry page to realize the function?
>  
>
It depends on the way you communicate with the payment gateway (PG):
let's suppose you send the request via POST and receive an answer via GET.
If you need it, you'll have a form to gather information about your
customer.
On form submit, you can save the data, and show a page with a simple
HTML form containing hidden data and an onLoad() redirect to the PG. The
best way to generate such a form is by designing a simple "send-request"
component. The browser autosubmits the data in the form to the PG, where
the user enters his card number and other relevant data.
If the server returns via GET, you can set up an address pointing to an
external page of your application. You access the returned values like so:

public void activateExternalPage(Object[] parameters, IRequestCycle cycle) {
...
RequestContext rc = cycle.getRequestContext();
String returnStatus = rc.getParameter("returnStatus");
String transactionID = rc.getParameter("transactionID");
...
doStuff(returnStatus, transactionID);
...
}

Things are really a lot more complicated (), but that's the general idea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to