I'm using the sandbox. I keep getting the discover test card declined with a INV TRAN message. I've tried different encryption methods but no avail. It shows up on the test merchant payments page as a failed payment, so I'm assuming the card number is making it through, so I'm thinking it's not the encryption. I've also received a crypto error before when trying various things, so I think it is something else. I looked at the merchant's permissions under api tokens and Merchant, Orders, and Payments are all Read & Write.
My workflow is as follows:
- using v3/merchants/mid/orders to generate a new order
- using v3/merchants/mid/orders/orderid to set it open
- get the key using v2/merchant/mid/pay/key
- encrypt the card with the prefix prepended
- use the v2/merchant/mid/pay to post the payment which is where the error returns