Skip to content

fix: pending ticket redirected to payment page. #2356

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

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

captain82
Copy link

@captain82 captain82 commented Sep 20, 2019

…d to the payment page

Fixes #2077

Changes: Snackbar is now showing for orders that are expired and canceled and not generating tickets for them. For pending payments user is now redirected to the payment page of their respective payment method.

@captain82 captain82 changed the title fixes #2077.Ticket does not open now when order pending and redirecte… fix #2077.Ticket does not open now when order pending and redirecte… Sep 20, 2019
@fossasia fossasia deleted a comment Sep 20, 2019
@fossasia fossasia deleted a comment Sep 20, 2019
@fossasia fossasia deleted a comment Sep 20, 2019
Copy link
Member

@nikit19 nikit19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a lot of unrelated indentation changes. Please fix it and make sure the build passes

@liveHarshit
Copy link
Member

liveHarshit commented Sep 20, 2019

Also, follow the guidelines: https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/

I would request you to please guide me as to how can I collaborate with you and also how can I contribute effectively to the organization. At times I might get

@captain82
Copy link
Author

I see a lot of unrelated indentation changes. Please fix it and make sure the build passes

ok @nikit19

@captain82
Copy link
Author

captain82 commented Sep 24, 2019

Also, follow the guidelines: https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/

**Open Source Developer Guide and Best Practices at FOSSASIA | blog.fossasia.org**I would request you to please guide me as to how can I collaborate with you and also how can I contribute effectively to the organization. At times I might get

@liveHarshit Why do Travis build keeps getting failed.

I would request you to please guide me as to how can I collaborate with you and also how can I contribute effectively to the organization. At times I might get

@liveHarshit
Copy link
Member

@fossasia fossasia deleted a comment Sep 26, 2019
@fossasia fossasia deleted a comment Sep 26, 2019
@fossasia fossasia deleted a comment Sep 26, 2019
@captain82 captain82 changed the title fix #2077.Ticket does not open now when order pending and redirecte… fix #2077.Pending ticket redirected to payment page. Sep 26, 2019
@captain82 captain82 changed the title fix #2077.Pending ticket redirected to payment page. fix.Pending ticket redirected to payment page. Sep 26, 2019
@captain82
Copy link
Author

@liveHarshit Semantic pull request is not passing.help needed.

@captain82 captain82 changed the title fix.Pending ticket redirected to payment page. fix:Pending ticket redirected to payment page. Sep 26, 2019
@auto-label auto-label bot added the fix label Sep 26, 2019
@captain82 captain82 changed the title fix:Pending ticket redirected to payment page. fix:pending ticket redirected to payment page. Sep 26, 2019
@iamareebjamal
Copy link
Member

You still haven't written the title in the same format as required. You are a programmer. You should know this.

if a > b:
    print('Hello')
ifa > b:
    print('Hello')

Are both of these statement equivalent?
How is the parser going to separate between the two

@captain82
Copy link
Author

captain82 commented Sep 27, 2019

You still haven't written the title in the same format as required. You are a programmer. You should know this.

if a > b:
    print('Hello')
ifa > b:
    print('Hello')

Are both of these statement equivalent?
How is the parser going to separate between the two

space between if and a.

All checks passed . Thank you @iamareebjamal

@captain82 captain82 changed the title fix:pending ticket redirected to payment page. fix: pending ticket redirected to payment page. Sep 27, 2019
Copy link
Member

@liveHarshit liveHarshit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide GIF.

@@ -29,7 +29,7 @@ class OrdersViewHolder(private val binding: ItemCardOrderBinding) : RecyclerView
}

itemView.setOnClickListener {
listener?.onClick(event.id, order.identifier ?: "", order.id)
listener?.onClick(event.id, order.identifier ?: "", order.id, event, order)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the parameters to a class

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal this OrderClickListener is used in more 3 fragments. If I change here I have to do that at all places. Should I do it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the point of refactoring

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal ok.all the 5 parameters should be replaced to 1 , right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, why are you transferring entire event and order. By that logic, there is no requirement for transferring first 3 parameters

@captain82
Copy link
Author

Please provide GIF.

@liveHarshit Here is a gif.

GIF_190927_175419 gif

findNavController(rootView).navigate(OrdersUnderUserFragmentDirections
.actionOrderUserToOrderDetails(eventID, orderIdentifier, orderId))
override fun onClick(eventID: Long, orderIdentifier: String, orderId: Long, event: Event, order: Order) {
if (order.status.equals("completed") || order.status.equals("placed")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use equals

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal Then how should I check the status is pending or completed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liveHarshit What you have to say about this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you check for equality of 2 strings in kotlin?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"==" ??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

findNavController(rootView).navigate(OrdersUnderUserFragmentDirections
.actionOrderUserToOrderDetails(eventID, orderIdentifier, orderId))
} else if (order.status.equals("cancelled")) {
rootView.snackbar("Event is Cancelled")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

} else if (order.status.equals("cancelled")) {
rootView.snackbar("Event is Cancelled")
} else if (order.status.equals("expired")) {
rootView.snackbar("Event is Expired")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

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

Successfully merging this pull request may close these issues.

Do not open tickets if the order status is not completed
5 participants