RIAEvangelist / node-dominos-pizza-api

This is a node.js wrapper for the dominos pizza apis
MIT License
548 stars 132 forks source link

Cash On Delivery #116

Closed alestor123 closed 1 year ago

alestor123 commented 3 years ago

hey can we have cash on delivery option @RIAEvangelist

RIAEvangelist commented 3 years ago

I believe there is already support for this, but I have not documented it yet. You should order a pizza from the dominos website using cash as the payment option. Look at the payloads in the console, and see where Cash is used.

I think this would be in the Payment object or the address object under service method.

But you will have to check on the dominos website to confirm.

alestor123 commented 3 years ago

@RIAEvangelist I think you should document it

alestor123 commented 3 years ago

@RIAEvangelist How do i put cash on deplivery

alestor123 commented 3 years ago

I think we can do it by leaving the payments with empty string

mattcroat commented 3 years ago

I figure this would be simple as doing (the Dominos API already supports it):

const payment = new Payment({ amount: order.amountsBreakdown.customer })

payment.type = 'Cash'

order.payments.push(payment)
Heath123 commented 3 years ago

Could do some interesting things with that.

RIAEvangelist commented 3 years ago

@Heath123 I updated your comment. You are 100% correct and I did what you are thinking about. I also reported it to dominos.

I feel the same as you, but none the less I do not want to put that thought out there because that hole goes pretty deep and could result in sad things happening. I like to promote only happy things.

Let's 🍕 for good ok!

Heath123 commented 3 years ago

Ah, I guess I could give bad people ideas, sorry

RIAEvangelist commented 3 years ago

@Heath123 NP, I have worked on a lot of security-related stuff including Class 3 medical devices that are permanently implanted in humans' bodies, so seeing these sorts of things comes naturally to me at this point. It took some self-training to make it automatic though. Thanks for being cool with me editing your post.