RIAEvangelist / node-dominos-pizza-api

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

Oder Placement Error: "BusinessRule ServiceMethodAllowedAtStore failed. Cause: nullOnStoreID" #64

Closed broccolistalker closed 7 years ago

broccolistalker commented 7 years ago

I am having trouble placing an order. Has anyone else experienced this problem: StatusItems: [ { Code: 'AutoAddedOrderId' }, { Code: 'PriceInformationRemoved' }, { Code: 'RuleExecutionError', Message: 'BusinessRule ServiceMethodAllowedForBuildingAtStore failed. Cause: nullOn StoreOrderID: ' } ], This is present after attempting to validate the order.

RIAEvangelist commented 7 years ago

What store ID was this for?

On Apr 16, 2017 6:26 AM, "broccolistalker" notifications@github.com wrote:

I am having trouble placing an order. Has anyone else experienced this problem: StatusItems: [ { Code: 'AutoAddedOrderId' }, { Code: 'PriceInformationRemoved' }, { Code: 'RuleExecutionError', Message: 'BusinessRule ServiceMethodAllowedForBuildingAtStore failed. Cause: nullOn StoreOrderID: ' } ], This is present after attempting to validate the order.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RIAEvangelist/node-dominos-pizza-api/issues/64, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWhkbl_j35YLoOQ39PddD7xlWsHq00Eks5rwhb5gaJpZM4M-oJG .

benhubsch commented 7 years ago

I'm also having this issue for store ID 7764

benhubsch commented 7 years ago

It's actually happening for all stores.

RIAEvangelist commented 7 years ago

@benhubsch can you confirm this is an issue with the examples as well?

benhubsch commented 7 years ago

We ended up figuring out the issue. It had nothing to do with the store itself -- we were later able to place a store at that order after inspecting this file closely: https://github.com/bhberson/pizzadash/blob/master/exampleorder.json

RIAEvangelist commented 7 years ago

What was the issue afterall, if you remember?

benhubsch commented 7 years ago

Not entirely sure. It either had something to do with the fact that the Dominos didn't deliver to our location, or something about our types (strings vs. numbers) being wrong.

clanderson87 commented 5 years ago

Getting something like this when I use order.place(). order.validate() returns success with Status: 1, but when place() is called on the exact same order, it returns a Status: -1 and a statusItem of {Code: "RuleExecutionError", Message: "BusinessRule BlacklistValidator failed. Cause: nullOn StoreOrderID: "}

I've tried with the StoreID as a string and a number, both return the same message.

clanderson87 commented 5 years ago

So after some trial and error I simply tried order.StoreOrderID = order.storeID. Both were 4 digit numbers. It worked and the order was successfully placed and correctly delivered. The result returned from order.place() returned some things I couldn't find in any of the docs:

Don't know what any of those are mean, but I got pizza. I'll take it.