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