Support Payment with Gift Cards

Card readers have the ability to read data from any piece of plastic with a magnetic strip, including gift cards. The interaction is no different in terms of communicating with the device. When the data is returned to the JavaScript for a gift card, it's up to the developer to determine the proper way to detect that the card is a gift card and not a credit card. It could be as simple as looking at the length of the card number. When the card type is determined, similar to a credit card, a specific event (payment:gift_card_data) needs to be fired, for example:
Alloy.eventDispatcher.trigger('payment:gift_card_data', {
    is_contactless:e.contactless == "true"
Note: In release 1.7.1 and earlier the event is gc_payment_entered.

Related Links

Create a Payment Module

Load the Native Module

Accept Payment

Approve Payment

Cancel Payment

Cancel Server Transaction

Handle Errors

Support Manual Card Number Entry

Display Whether the Payment Device Is Connected

Configure Device in Admin Dashboard

Support Barcode Scanner

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.