First, create an api from eway api setup page for online hosted rapid payment
Then download source code.
Browse http://localhost/ewayHosted/index.php and fill up Api Key & Password field and following by other fields and click 'Pay...' button.
If all details are correct you would get data like below from eway:
stdClass Object
(
[SharedPaymentUrl] => https://secure-au.sandbox.ewaypayments.com/sharedpage/sharedpayment?AccessCode=F9802jxD7ElfeXKsdljElP1OKxSJyKZHJuaRB8qf97fzPPiDGFS-JmlfVug7kAvkctMALC0cSrVtKdomIp0DPlJv0CdRAl4apAHgJNzFMo5TXfQ804a8-5BP80gWFSmOLsLgeXOGFrjiuBvfYPjjs8F1zBw==
[AccessCode] => F9802jxD7ElfeXKsdljElP1OKxSJyKZHJuaRB8qf97fzPPiDGFS-JmlfVug7kAvkctMALC0cSrVtKdomIp0DPlJv0CdRAl4apAHgJNzFMo5TXfQ804a8-5BP80gWFSmOLsLgeXOGFrjiuBvfYPjjs8F1zBw==
[Customer] => stdClass Object
(
[CardNumber] =>
[CardStartMonth] =>
[CardStartYear] =>
[CardIssueNumber] =>
[CardName] =>
[CardExpiryMonth] =>
[CardExpiryYear] =>
[IsActive] =>
[TokenCustomerID] =>
[Reference] => KU060238
[Title] => Mr.
[FirstName] => Pritom
[LastName] => Kumar
[CompanyName] => WEB ACTIVE
[JobDescription] => Developer
[Street1] => 15 Smith St
[Street2] =>
[City] => Phillip
[State] => ACT
[PostalCode] => 2602
[Country] => au
[Email] =>
[Phone] => 1800 10 10 65
[Mobile] => 1800 10 10 65
[Comments] => Some comments here
[Fax] => 02 9852 2244
[Url] => http://www.yoursite.com
)
[Payment] => stdClass Object
(
[TotalAmount] => 100
[InvoiceNumber] => INVOICE1001
[InvoiceDescription] => Individual Invoice Description
[InvoiceReference] => 513456
[CurrencyCode] => AUD
)
[FormActionURL] => https://secure-au.sandbox.ewaypayments.com/AccessCode/F9802jxD7ElfeXKsdljElP1OKxSJyKZHJuaRB8qf97fzPPiDGFS-JmlfVug7kAvkctMALC0cSrVtKdomIp0DPlJv0CdRAl4apAHgJNzFMo5TXfQ804a8-5BP80gWFSmOLsLgeXOGFrjiuBvfYPjjs8F1zBw==
[CompleteCheckoutURL] =>
[Errors] =>
)
Then collect 'AccessCode' from data returned and redirect to 'SharedPaymentUrl' where your original payment would process.
Need to fill up all fields and click on 'PAY NOW' button above.
Now click on 'FINALIZE TRANSACTION' button to redirect back to your original site from where you went.
And finally your transaction in eWay portal: