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

Purchases: Disable cancel for pending_transfer domains #8859

Merged
merged 2 commits into from
Oct 25, 2016

Conversation

aidvu
Copy link
Contributor

@aidvu aidvu commented Oct 19, 2016

Users were able to cancel domains that were pending transfer through /purchases, although the cancel would always fail.

Hide the cancel option if the domain is pending transfer.

Requires D3106-code.

@matticbot
Copy link
Contributor

Domains that are pending transfer cannot be canelled
@aidvu aidvu force-pushed the update/no-cancel-purchases-if-pending-transfer branch from 8c49fab to d611d99 Compare October 19, 2016 17:30
@aidvu aidvu self-assigned this Oct 19, 2016
@aidvu aidvu added [Type] Bug [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature Group] Emails & Domains Features related to email integrations and domain management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. labels Oct 19, 2016
@@ -127,6 +131,10 @@ function isPaidWithPaypal( purchase ) {
return 'paypal' === purchase.payment.type;
}

function isPendingTransfer( purchase ) {
return true === purchase.pendingTransfer;
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for an equality check here.

@@ -60,5 +61,9 @@ describe( 'index', () => {
it( 'should be cancelable when the purchase can have auto-renew disabled', () => {
expect( isCancelable( PLAN_PURCHASE ) ).to.be.true;
} );

it( 'should be cancelable when the purchase can have auto-renew disabled', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

CP mistake :) The test name needs a change

@aidvu
Copy link
Contributor Author

aidvu commented Oct 24, 2016

@umurkontaci Updated. :)

@klimeryk
Copy link
Contributor

LGTM! 🚢

@klimeryk klimeryk added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 25, 2016
@aidvu aidvu merged commit fec71da into master Oct 25, 2016
@aidvu aidvu deleted the update/no-cancel-purchases-if-pending-transfer branch October 25, 2016 12:13
@aidvu aidvu added this to the Cobalt: Backlog milestone Oct 25, 2016
bisko pushed a commit that referenced this pull request Nov 16, 2016
Disable cancel in `/purchases` for domains
that are pending transfer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. [Type] Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants