Ajax Checkout & Payment

The Checkout and Payment family of Ajax methods allow you to validate some payment methods from anywhere in Aurora. This is currently limited to use with Gift Cards from the following providers:

This article describes how to use the payment methods and what they do.

Get Balance AJAX Interface

Overview

Permission Required: None

Method Call: /checkout/payment-balance

Aurora Demo Example: http://demo.auroracommerce.com/checkout/

📘

This method validates a balance driven additional payment method such as a Givex Gift Card.

Method Description

Method specific parameters

NameDescriptionExampleRequired?
payment_typeThe Aurora payment process type.hccYes
transaction_typeThe Aurora payment transaction type identifier.Givex GiftCard or EagleEye GiftCardYes
card_numberThe card number.4000 0000 1234 5678Yes
expiry_monthThe card export month (please provide 00 if your cards do not support expiry dates).06Yes
expiry_yearThe card export year (please provide 00 if your cards do not support expiry dates).2020Yes
cvvThe card CVV.123No
recaptcha_responseThe response given resulting from a successful ReCaptcha validation attempt.N/AYes, if no CVV has been provided, otherwise No.

🚧

The ReCapture process is only require if:

a) It is configured in Aurora.
b) The CVV number has not been provided. If the CVV number is provided, then it will be assumed that the Gift Card provider requires this for validation and so will be used in place of the ReCapture process.

Example Template Code

<script type="text/javascript">
 
var request_data = {
    payment_type: 'hcc',
    transaction_type: 'Givex GiftCard',
    card_number: card_number.val(),
    expiry_month: expiry_month.val(),
    expiry_year: expiry_year.val(),
    cvv: cvv.val()
};
 
$.get('/checkout/payment-balance', request_data, function(response) {
 
    if (response.balance > 0) {
 
        alert('Card is valid');
 
    } else {
 
        alert('Card is not valid or has no balance');
 
    }
 
}, 'json');
 
</script>