question

pbuilder avatar image
pbuilder asked pbuilder commented

"Invalid source or token" error when attempting to process a live credit card

We just moved our payment page (clover iframe) to production after successfully processing test cards in the sandbox.

Questions.

1. What could cause this error. We validated the correct mid and Clover eComm Iframe private token is being used.

2. Why does the Clover eComm Iframe private token change each time I navigate away from the "api-tokens" setup page and back again?

3. Do previous tokens immediately become invalid?

e-commerce api
3 comments
10 |2000

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

Richelle Herrli avatar image Richelle Herrli ♦♦ commented ·

Is this the first time you've tried to process the payment using the card token, or is this a subsequent attempt?

When you say the eComm iFrame private token, which private token are you talking about? The app private token, the tokenized card, the PAKMS key, or something else?

If the merchant doesn't have multipay enabled, the card data will need to be re-entered into the iFrame for every transaction.

0 Likes 0 ·
pbuilder avatar image pbuilder Richelle Herrli ♦♦ commented ·

The card token was generated via the Clover eComm IFrame so the token has not been used.

Regarding #2, I was referencing the clover merchant web interface, the "API Tokens" page.


0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ pbuilder commented ·

1) I would guess you aren't passing a valid source. Without the exact steps you are taking or you merchant id (provide in a private post), we can't do much to help.

2) This is a known issue.

3) No

0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered pbuilder commented

It looks like your iframe is still pulling in the sandbox sdk. e.g. - https://checkout.sandbox.dev.clover.com/sdk.js. You need to change this to prod https://checkout.clover.com/sdk.js.

1 comment
10 |2000

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

pbuilder avatar image pbuilder commented ·

That worked! Also had the update the public key as well.

Thanks!

0 Likes 0 ·
pbuilder avatar image
pbuilder answered David Marginian Deactivated converted comment to answer

Here is the detail. Can you also verify I am using the correct production endpoints.

class ProductionConfig(Config):

DEBUG = False

# Clover details

CLOVERMERCHANT = "redacted"

CLOVERV1URL = "https://scl.clover.com/v1/"

CLOVERV3URL = "https://api.clover.com/v3/merchants/" + CLOVERMERCHANT + "/"

10 |2000

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