mollie / mollie-api-php

Mollie API client for PHP
http://www.mollie.com
BSD 2-Clause "Simplified" License
550 stars 189 forks source link

Unknown field: cardToken #717

Closed pcoenen closed 4 months ago

pcoenen commented 4 months ago

Specifications

Describe the issue

I was trying the following code example from your documentation, but it always returns an error: Mollie.API.Error.Error: Error executing API call (request): Unknown field: cardToken.

from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key('live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')
payment = mollie_client.payments.create({
   'method': 'creditcard',
   'amount': {
         'currency': 'EUR',
         'value': '10.00'
   },
   'description': 'Order #12345',
   'redirectUrl': 'https://webshop.example.org/order/12345/',
   'webhookUrl': 'https://webshop.example.org/payments/webhook/',
   'cardToken': 'tkn_UqAvArS3gw'
})

...

fjbender commented 4 months ago

Hey @pcoenen,

That looks like Python code - but Version 1.2.0 is quite old. Also, this is the repository for the PHP API Client. Could you check you're using a more recent version, and if the error persists open a ticket in the Python API Client Repository?

pcoenen commented 4 months ago

Thanks a lot, sorry for picking the wrong repo, I'm a big fan and using both API's at the same time, therefore the confusion.