Overview
After payment completion, Oceanpayment automatically redirects the user to the pre-configured URLs based on the payment result.
How It Works
- Merchants use a front-end form to call Hosted Checkout submit parameters:
<form action="https://test-secure.oceanpayment.com/gateway/service/pay" method="post">
<input type="hidden" name="account" value="995149" />
<input type="hidden" name="terminal" value="99514901" />
<input type="hidden" name="order_number" value="NO12345678" />
<input type="hidden" name="order_currency" value="USD" />
<input type="hidden" name="order_amount" value="0.01" />
<input type="hidden" name="signValue" value="egh4fjs2f3h4mc5g3j7676vzva53gfd33dfga1458fe2f12343y" />
<input type="hidden" name="backUrl" value="http://www.abc.com/result.php" />
<input type="hidden" name="noticeUrl" value="http://www.abc.com/notice.php" />
<input type="hidden" name="methods" value="Credit Card" />
<input type="hidden" name="billing_firstName" value="test" />
<input type="hidden" name="billing_lastName" value="test" />
<input type="hidden" name="billing_email" value="test@test.com" />
<input type="hidden" name="billing_phone" value="0755-123456789" />
<input type="hidden" name="billing_country" value="US" />
<input type="hidden" name="billing_city" value="Washington D.C." />
<input type="hidden" name="billing_address" value="705A big Road" />
<input type="hidden" name="billing_zip" value="529012" />
<input type="hidden" name="productSku" value="#001" />
<input type="hidden" name="productName" value="dress" />
<input type="hidden" name="productNum" value="1" />
<input type="submit" value="Submit" />
</form>
- Users select a payment method and make payment on the Oceanpayment page;
- After payment is completed, the user is redirected back to the merchant's website.
Handling Payment Results
In the payment result processing,
- Synchronous return results depend on
backUrl:
- Response
//The form returned via POST:
Array
(
[response_type] => 0
[account] => 995149
[terminal] => 99514901
[signValue] => F03C3D5154FC2672C5EC05BAD3DDDF0892617CC1517517DCD37E6499AA896D73
[methods] => Credit Card
[order_number] => NO12345678
[order_currency] => USD
[order_amount] => 0.01
[order_notes] =>
[card_number] =>
[card_type] => null
[payment_country] => US
[payment_id] => 221214134817000529042
[payment_Method] => Credit Card
[payment_authType] => 2
[payment_status] => 1
[payment_details] => 80000:Transaction Approved
[payment_solutions] => None required.
[payment_risk] =>
[payment_amount] => null
[payment_exchangeRate] => null
[pay_userId] => null
[pay_barCode] =>
[payment_bankInfo] =>
)
- You also need to obtain the transaction information via
noticeUrlWebhook. - View Payment Status Description.
Signature
The signature (signValue) format differs depending on the Hosted Checkout redirect mode you choose. Refer the Signature and Verification section for detailed instructions.