Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian addresses always raise a -1 status exception? #116

Open
kbots-tech opened this issue Jan 1, 2021 · 1 comment
Open

Canadian addresses always raise a -1 status exception? #116

kbots-tech opened this issue Jan 1, 2021 · 1 comment

Comments

@kbots-tech
Copy link

kbots-tech commented Jan 1, 2021

Hi there I've started messing around with this library a bit to make a discord bot for me and a group of friends to order pizzas through discord. I've gotten U.S. adresses working fine with the default settings and such but when I've been going in and trying with Canadian ones I've been getting an error raised in order.pay_with() Is this a known error/how could I fix it? I double checked and I am using the proper urls throughout and it adds to the order and shows the menu fine. Also has anyone discovered a way to add order instructions to it? I'd like to give the option to add that (or have a default one to be safe) but didn't seem to see that anywhere even in what's being sent that I could add/edit.

Thanks!

@TTWNO
Copy link

TTWNO commented Nov 25, 2021

When initializing an address, you must explicitly tell it you are from Canada:

from pizzapi.urls import COUNTRY_CANADA
addr = Address("123 Cougar St.", "Banff", "AB", "T1W2L3", COUNTRY_CANADA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants