






Copyright © 2023 OnePay
Checkout allows you to quickly and easily enter user details and complete the payment in a few easy steps.
Save card details with
Card Number
Expiry date
CVV
The following TEST card can be used to test your integration.
Card No : 4017779995555556
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>OnePay Token</title>
</head>
<body>
<div id="ResultOnepayResponse"></div>
<input id="onepayResult" type="hidden" />
<input id="onepayToken" type="hidden" />
<button id="btnAdd"> Add card</button>
<div id="divonepayiframe"> </div>
<!--data-displayMode is popup or inline-->
</body>
</html>
<script id="scriptIframe" type="text/javascript" src="https://apiqa.onepay.com/PayUI/onepay_v2.0.js"
data-key='ed6879be-203e-9f51-d4da-77b8a8d11a36'
data-displayMode="popup"
data-mode='token'>
</script>
<script>
//Show response in Div from onepayResult hidden field. Edit card is success, onepay response stores in onepayResult hidden field value
function ShowOnePayResponse() {
//document.getElementById("ResultOnepayResponse").innerHTML = document.getElementById("onepayResult").value;
let jsonResult = JSON.parse(document.getElementById("onepayResult").value);
if (jsonResult != undefined && jsonResult.customer_response !== undefined) {
resultText = jsonResult.customer_response.result_text
if(jsonResult.customer_response.result_code === 1){
alert("Card/token information added success" ); // popup or display success status
}
}
}
btnAdd.onclick = function () {
let customerId = '';
// params are 1) div id for render iFrame in Div, 2) customerId is optional 3) Call back method is optional
//AddCard( 'divonepayiframe', customerId, ShowOnePayResponse);
//
AddCard( '', '', ShowOnePayResponse);
//// without param , after close inspect value of onepayResult hidden field
// AddCard();
}
</script>
9801 Washingtonian Blvd.
Suite 200 Gaithersburg, MD 20878
Phone : 650-709-2400
Email : team@onepay.com
OnePay is a registered ISO/MSP of Merrick Bank, South Jordan, UT
Copyright © 2023 OnePay
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |