question

waldowal avatar image
waldowal asked beckham86 answered

Can I use a vaulted card token from IFRAME with payment using CloverConnector and Clover Mini?

I am successfully vaulting cards using the IFRAME integration, then charging to them using the ECommerce API.

However, when I try to use the same card token to charge the card via the Clover Mini using the .NET CloverConnector, it always errors with: "Transaction failed: Token is invalid.".

Is this not allowed? Or am I doing something wrong in my CloverConnector code?:

SaleRequest request = new SaleRequest()
{
    ExternalId = transactionID, // 32 character ID
    Type = PayIntent.TransactionType.PAYMENT,
    Amount = Convert.ToInt64(saleAmount * 100D),
    TaxAmount = Convert.ToInt64(taxAmount * 100D),
    CardEntryMethods = CloverConnector.CARD_ENTRY_METHOD_MANUAL | CloverConnector.CARD_ENTRY_METHOD_MAG_STRIPE | CloverConnector.CARD_ENTRY_METHOD_ICC_CONTACT | CloverConnector.CARD_ENTRY_METHOD_NFC_CONTACTLESS,
    CardNotPresent = false,
    TipMode = com.clover.remotepay.sdk.TipMode.NO_TIP,
    DisableCashback = true,
    DisableRestartTransactionOnFail = false,
    DisablePrinting = false,
    DisableReceiptSelection = false,
    DisableDuplicateChecking = false,
    AutoAcceptSignature = true,
    AutoAcceptPaymentConfirmations = false,
    AllowOfflinePayment = true,
    ApproveOfflinePaymentWithoutPrompt = false,
    ForceOfflinePayment = false,
    SignatureEntryLocation = com.clover.sdk.v3.payments.DataEntryLocation.NONE,                
};

// If a Vaulted Card was provided, add the information
if (vaultedCard != null)
{
    request.VaultedCard = new com.clover.sdk.v3.payments.VaultedCard();
    request.VaultedCard.cardholderName = vaultedCard.CardholderName;
    request.VaultedCard.first6 = vaultedCard.First6Digits;
    request.VaultedCard.last4 = vaultedCard.Last4Digits;
    request.VaultedCard.expirationDate = $"{vaultedCard.ExpirationMonth:00}{vaultedCard.ExpirationYear.ToString().Substring(2,2)}";
    request.VaultedCard.token = vaultedCard.CardToken; 
}            

// Request the Sale
this._connector.Sale(request);


(In case you are wondering, I'm trying to use the Clover device instead of coding to the ECommerce API from my POS so that I can take advantage of the Clover device's offline capabilities, redundant network support, etc.)

Thanks

Clover Minie-commerce apiPaymentConnectorUSB Pay Display
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
beckham86 avatar image
beckham86 answered

Check Token Compatibility: Verify that the token you are using is intended for in-person transactions. You may need to generate a new token specifically for Clover Mini.

Review CloverConnector Code: Ensure that your implementation of the CloverConnector is correctly set up to handle the token you are passing. Double-check the parameters and the request structure.

Consult Clover Documentation: Refer to the Krunker io CloverConnector documentation for any specific requirements or limitations regarding the use of vaulted tokens with Clover Mini.

Contact Clover Support: If the issue persists, reaching out to Clover support may provide additional insights or solutions tailored to your specific integration scenario.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community