Implement the Hosted iFrame Tokenizer

Created on 20 February 2023, almost 2 years ago
Updated 14 June 2023, over 1 year ago

Once the PaymentGateway plugin is stubbed out, we next want to implement the Hosted iFrame Tokenizer so we can prepare to process payments. This iframe implementation is different from others in that it's 1) a single iframe that collects the card number, expiration, and CVV and 2) returns a JSON object with the token and validated expiration upon submission.

The docs are: https://integrate.clover.com/developers/hosted-iframe-tokenizer/

And the example implementation we want can be seen here: https://fts-uat.cardconnect.com/itoke/outer-page.html?useexpiry=true&use...

Implementing this will require a PaymentMethodAddForm PluginForm similar to what's in place in the Braintree Hosted Fields implementation. This module's form will need to have a single iframe element with the appropriate query parameters in place, and it will need two hidden form fields called token and expiration that we can put the message and expiry in the response respectively:

When the form is submitted, we then need to create a stored payment method for this token. Note that the documentation tells you how to interpret the token in the "message" field there: https://integrate.clover.com/developers/guides/cardsecure/

We can derive the card type and first 2 + last 4 digits from the token, and the expiration field will provide the validated expiration details.

I'm pretty sure these tokens are endlessly reusable, but for now, let's make them payment method not reusable. Reusability will require more work on the checkout form integration and user account integration and should be deferred for a later time.

πŸ“Œ Task
Status

Fixed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rszrama

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024