You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the example of how to set the expiry date for a card is shown as:
card.exp_month='01'card.exp_year='2019'
However, the <expdate> tag with the request sent to the API is being incorrectly set, so for the example above the <expdate> would be set to 2020.
The reason for this is the short_code property against the CreditCardData class:
@propertydefshort_expiry(self):
''' The card's expiration date in `MMYY` format. '''month=str(self.exp_month).zfill(2)
year=str(self.exp_year).zfill(4)[:2]
return'{}{}'.format(month, year)
The year assignment selects the first 2 digits of the year not the last 2, it needs to be:
year=str(self.exp_year).zfill(4)[2:]
The text was updated successfully, but these errors were encountered:
Currently the example of how to set the expiry date for a card is shown as:
However, the
<expdate>
tag with the request sent to the API is being incorrectly set, so for the example above the<expdate>
would be set to2020
.The reason for this is the
short_code
property against theCreditCardData
class:The year assignment selects the first 2 digits of the year not the last 2, it needs to be:
The text was updated successfully, but these errors were encountered: