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

Do not open tickets if the order status is not completed #2077

Closed
liveHarshit opened this issue Jul 6, 2019 · 71 comments · May be fixed by #2356
Closed

Do not open tickets if the order status is not completed #2077

liveHarshit opened this issue Jul 6, 2019 · 71 comments · May be fixed by #2356
Assignees
Labels
Milestone

Comments

@liveHarshit
Copy link
Member

liveHarshit commented Jul 6, 2019

Describe the bug
Currently, tickets are fetching if the order status is incompleted.

Would you like to work on the issue?

Open for all

@captain82
Copy link

@liveHarshit I would like to work on this issue.

@liveHarshit
Copy link
Member Author

@liveHarshit I would like to work on this issue.

Please go ahead. Also, we assign one issue at a time. For reference #1932

@captain82
Copy link

@liveHarshit I will work on this issue first.

@captain82
Copy link

@liveHarshit Can you describe a little what exactly needs to happen?

@liveHarshit
Copy link
Member Author

@liveHarshit Can you describe a little what exactly needs to happen?

In the tickets section, order status is displaying for tickets. Sometimes an order is pending(due to incomplete payment), then instead of opening ticket details, it should redirect for payment. And for another status (canceled or expire), only a message should display.
Open the ticket only when order is completed or placed(in case of offline payment)

@liveHarshit liveHarshit added this to the Codeheat 2 milestone Sep 10, 2019
@liveHarshit
Copy link
Member Author

@liveHarshit, how should I get the order and event by their ids as they are required as a parameter to start PayPal payment?

From order fragment and order under user view model.

@thatfedupguy
Copy link

thatfedupguy commented Dec 27, 2019

I am unable to create a pending order, need help

@thatfedupguy
Copy link

Also every time I am trying to create order...snackbar appears with a message "unable to create order".

@rob729
Copy link
Contributor

rob729 commented Dec 31, 2019

@tusharr-98 Are you still working on this issue?

@thatfedupguy
Copy link

@rob729 are you able to create Order ??

@thatfedupguy
Copy link

@liveHarshit help needed

@liveHarshit
Copy link
Member Author

@liveHarshit help needed

yes?

@thatfedupguy
Copy link

@liveHarshit I am unable to create pending order

@iamareebjamal
Copy link
Member

You are a developer, not a user. We need more information like the logs and server endpoint, request and response of the failing call

@thatfedupguy
Copy link

I mean what i have to do to create a pending order. I have gone through the code but cannot figure it out.

@iamareebjamal
Copy link
Member

Use API or frontend

@aryanguls
Copy link
Contributor

I'll work on this and do it.

@rob729
Copy link
Contributor

rob729 commented Jan 31, 2020

@nikit19 @liveHarshit @iamareebjamal I am not able to create a pending order. Can you please help me in creating one?

@liveHarshit
Copy link
Member Author

@nikit19 @liveHarshit @iamareebjamal I am not able to create a pending order. Can you please help me in creating one?

Create order, do not make payment.

@rob729
Copy link
Contributor

rob729 commented Jan 31, 2020

I am getting "error in fetching tickets" error.

Logs:-
E/EventDetailsViewModel$syncTickets: Error fetching tickets
com.github.jasminb.jsonapi.exceptions.InvalidJsonApiResourceException: Included must be an array of valid resource objects, or an empty array ([])

What could be the possible reason for this error?

@rob729
Copy link
Contributor

rob729 commented Jan 31, 2020

@dheerajkotwani Are you facing this issue?

I am getting "error in fetching tickets" error.

Logs:-
E/EventDetailsViewModel$syncTickets: Error fetching tickets
com.github.jasminb.jsonapi.exceptions.InvalidJsonApiResourceException: Included must be an array of valid resource objects, or an empty array ([])

What could be the possible reason for this error?

@dheerajkotwani
Copy link
Member

while opening ticket it is giving error
Logs:
2020-01-31 20:07:06.036 12422-12422/com.eventyay.attendee E/TicketsViewModel$loadTickets: Error fetching tickets 9 com.github.jasminb.jsonapi.exceptions.InvalidJsonApiResourceException: Included must be an array of valid resource objects, or an empty array ([]) at com.github.jasminb.jsonapi.ValidationUtils.ensureValidResourceObjectArray(ValidationUtils.java:82) at com.github.jasminb.jsonapi.ResourceConverter.getIncludedResources(ResourceConverter.java:423) at com.github.jasminb.jsonapi.ResourceConverter.parseIncluded(ResourceConverter.java:388) at com.github.jasminb.jsonapi.ResourceConverter.readDocumentCollection(ResourceConverter.java:281) at com.github.jasminb.jsonapi.retrofit.JSONAPIResponseBodyConverter.convert(JSONAPIResponseBodyConverter.java:35) at com.github.jasminb.jsonapi.retrofit.JSONAPIResponseBodyConverter.convert(JSONAPIResponseBodyConverter.java:15) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:225) at retrofit2.OkHttpCall.execute(OkHttpCall.java:188) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:45) at io.reactivex.Observable.subscribe(Observable.java:12284) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34) at io.reactivex.Observable.subscribe(Observable.java:12284) at io.reactivex.internal.operators.flowable.FlowableFromObservable.subscribeActual(FlowableFromObservable.java:29) at io.reactivex.Flowable.subscribe(Flowable.java:14935) at io.reactivex.internal.operators.flowable.FlowableOnBackpressureLatest.subscribeActual(FlowableOnBackpressureLatest.java:32) at io.reactivex.Flowable.subscribe(Flowable.java:14935) at io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:37) at io.reactivex.Flowable.subscribe(Flowable.java:14935) at io.reactivex.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:53) at io.reactivex.Flowable.subscribe(Flowable.java:14935) at io.reactivex.Flowable.subscribe(Flowable.java:14882) at io.reactivex.internal.operators.flowable.FlowableSwitchMap$SwitchMapSubscriber.onNext(FlowableSwitchMap.java:129) at io.reactivex.internal.operators.flowable.FlowableFlatMapMaybe$FlatMapMaybeSubscriber.innerSuccess(FlowableFlatMapMaybe.java:175) at io.reactivex.internal.operators.flowable.FlowableFlatMapMaybe$FlatMapMaybeSubscriber$InnerObserver.onSuccess(FlowableFlatMapMaybe.java:397) at io.reactivex.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:61) at io.reactivex.Maybe.subscribe(Maybe.java:4290) at io.reactivex.internal.operators.flowable.FlowableFlatMapMaybe$FlatMapMaybeSubscriber.onNext(FlowableFlatMapMaybe.java:132) at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:407) at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176) at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:288) at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:253) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:760)

@iamareebjamal
Copy link
Member

Can't help unless you give request URL and response

@dheerajkotwani
Copy link
Member

https://open-event-api-dev.herokuapp.com/v1/events/126/tickets?include=event&fields

{"data": [{"type": "ticket", "attributes": {"is-fee-absorbed": true, "min-price": 1.0, "min-order": 1, "price": 0.0, "is-checkin-restricted": true, "max-order": 10, "deleted-at": null, "position": 1, "max-price": 0.0, "type": "free", "sales-starts-at": "2020-01-14T13:03:49.335000+00:00", "is-description-visible": true, "name": "free2", "sales-ends-at": "2020-02-12T18:30:00+00:00", "auto-checkin-enabled": false, "description": null, "quantity": 50, "is-hidden": false}, "relationships": {"access-codes": {"links": {"self": "/v1/tickets/131/relationships/access-codes", "related": "/v1/tickets/131/access-codes"}}, "event": {"links": {"self": "/v1/tickets/131/relationships/event", "related": "/v1/tickets/131/event"}, "data": {"type": "event", "id": "126"}}, "attendees": {"links": {"self": "/v1/tickets/131/relationships/attendees", "related": "/v1/attendees?ticket_id=131"}}, "ticket-tags": {"links": {"self": "/v1/tickets/131/relationships/ticket-tags", "related": "/v1/tickets/131/ticket-tags"}}, "discount-codes": {"links": {"self": "/v1/tickets/131/relationships/discount-codes", "related": "/v1/tickets/131/discount-codes"}}}, "id": "131", "links": {"self": "/v1/tickets/131"}}, {"type": "ticket", "attributes": {"is-fee-absorbed": true, "min-price": 1.0, "min-order": 1, "price": 0.0, "is-checkin-restricted": true, "max-order": 10, "deleted-at": null, "position": 0, "max-price": 0.0, "type": "free", "sales-starts-at": "2020-01-13T16:30:14.088000+00:00", "is-description-visible": true, "name": "free", "sales-ends-at": "2020-02-12T18:30:00+00:00", "auto-checkin-enabled": false, "description": null, "quantity": 10, "is-hidden": false}, "relationships": {"access-codes": {"links": {"self": "/v1/tickets/128/relationships/access-codes", "related": "/v1/tickets/128/access-codes"}}, "event": {"links": {"self": "/v1/tickets/128/relationships/event", "related": "/v1/tickets/128/event"}, "data": {"type": "event", "id": "126"}}, "attendees": {"links": {"self": "/v1/tickets/128/relationships/attendees", "related": "/v1/attendees?ticket_id=128"}}, "ticket-tags": {"links": {"self": "/v1/tickets/128/relationships/ticket-tags", "related": "/v1/tickets/128/ticket-tags"}}, "discount-codes": {"links": {"self": "/v1/tickets/128/relationships/discount-codes", "related": "/v1/tickets/128/discount-codes"}}}, "id": "128", "links": {"self": "/v1/tickets/128"}}], "included": [{"type": "event", "id": "126", "links": {"self": "/v1/events/126"}}], "links": {"self": "/v1/events/126/tickets?include=event&fields%5Bevent%5D=id&page%5Bsize%5D=0"}, "meta": {"count": 2}, "jsonapi": {"version": "1.0"}}

@iamareebjamal
Copy link
Member

The URL is invalid

@iamareebjamal
Copy link
Member

Revert jsonapi-converter to previous version and see if it is working

@iamareebjamal
Copy link
Member

Add this DeserializationFeature to true - ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIP

@dheerajkotwani
Copy link
Member

Reverting the dependency worked

@iamareebjamal
Copy link
Member

It's better if you use ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIP

@dheerajkotwani
Copy link
Member

unable to resolve, how to use this

@rob729
Copy link
Contributor

rob729 commented Feb 2, 2020

It's better if you use ALLOW_UNKNOWN_TYPE_IN_RELATIONSHIP

@iamareebjamal Can you please tell me in which file this change has to be made?

@iamareebjamal
Copy link
Member

Read the docs of the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment