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

Selecting Completed orders and clicking "Capture" on the bulk order editor throws a server error #3705

Closed
kieckhafer opened this issue Feb 9, 2018 · 2 comments

Comments

4 participants
@kieckhafer
Copy link
Member

commented Feb 9, 2018

Expected behavior

There should be no server errors - and perhaps a client notice that says an order is already complete - when clicking "Capture" after selecting orders using the bulk order table.

Actual behavior

When I select already completed orders in the bulk orders table, and then click the Capture button again, I get the following server error:

19:30:28.180Z FATAL Reaction:
  Failed to capture transaction. { _id: 'T82wrZLHWqf33jRqY',
    sessionId: 'cxR9c4jSHDxvwxFd6',
    userId: 'ak6gtXoEjsiPbnmSJ',
    shopId: 'J8Bhq3uTtdgwZx3rz',
    workflow: 
     { status: 'coreOrderWorkflow/completed',
       workflow: 
        [ 'coreOrderWorkflow/created',
          'coreOrderWorkflow/processing',
          'coreOrderWorkflow/completed' ] },
    billing: 
     [ { paymentMethod: [Object],
         invoice: [Object],
         address: [Object],
         shopId: 'J8Bhq3uTtdgwZx3rz',
         _id: 'hu4ECAkX3Y9Q6zJpr',
         currency: [Object] } ],
    discount: 0,
    tax: 0,
    items: 
     [ { _id: 'Qjim4ngnvjT9wh2LB',
         shopId: 'J8Bhq3uTtdgwZx3rz',
         productId: 'BCTMZ6HTxFSppJESk',
         quantity: 6,
         product: [Object],
         variants: [Object],
         title: 'Basic Reaction Product',
         type: 'simple',
         parcel: [Object],
         shippingMethod: [Object],
         workflow: [Object] },
       { _id: '2KBNqDeyPnKyfYPHs',
         shopId: 'J8Bhq3uTtdgwZx3rz',
         productId: 'BCTMZ6HTxFSppJESk',
         quantity: 0,
         product: [Object],
         variants: [Object],
         title: 'Basic Reaction Product',
         type: 'simple',
         parcel: [Object],
         shippingMethod: [Object],
         workflow: [Object] } ],
    shipping: 
     [ { shopId: 'J8Bhq3uTtdgwZx3rz',
         shipmentQuotes: [Array],
         shipmentQuotesQueryStatus: [Object],
         _id: '9Gp2ZTFBL5T3KGnB6',
         address: [Object],
         shipmentMethod: [Object],
         paymentId: 'hu4ECAkX3Y9Q6zJpr',
         items: [Array],
         workflow: [Object],
         shippingLabelUrl: 'https://shippo-delivery-east.s3.amazonaws.com/abc08f80598c49cea6a31f4975921722.pdf?Signature=s4ZnCoc6goDcChYHqpBPs%2B9u1JU%3D&Expires=1549652715&AWSAccessKeyId=AKIAJGLCC5MYLLWIG42A',
         tracking: '92612901755477000000000010',
         shippo: [Object] } ],
    cartId: 'k5uyfSoyXXoXQ7hmv',
    email: 'cassy+register@reactioncommerce.com',
    createdAt: 2018-02-08T19:02:23.685Z,
    updatedAt: 2018-02-08T19:30:24.588Z,
    history: 
     [ { event: 'Shipping state set by bulk operation',
         value: 'picked',
         userId: 'Q4qru6T2RRR48yd6F',
         updatedAt: 2018-02-08T19:04:21.487Z },
       { event: 'Shipping state set by bulk operation',
         value: 'packed',
         userId: 'Q4qru6T2RRR48yd6F',
         updatedAt: 2018-02-08T19:04:54.433Z },
       { event: 'Shipping state set by bulk operation',
         value: 'shipped',
         userId: 'Q4qru6T2RRR48yd6F',
         updatedAt: 2018-02-08T19:29:07.978Z },
       { event: 'Shipping state set by bulk operation',
         value: 'labeled',
         userId: 'Q4qru6T2RRR48yd6F',
         updatedAt: 2018-02-08T19:30:12.912Z } ] } ch_1BtKf5BXXkbZQs3x5SeolgRL { type: 'StripeInvalidRequestError',
    rawType: 'invalid_request_error',
    code: undefined,
    param: undefined,
    message: 'Charge ch_1BtKf5BXXkbZQs3x5SeolgRL has already been captured.',
    detail: undefined,
    raw: 
     { type: 'invalid_request_error',
       message: 'Charge ch_1BtKf5BXXkbZQs3x5SeolgRL has already been captured.',
       headers: 
        { server: 'nginx',
          date: 'Thu, 08 Feb 2018 19:30:28 GMT',
          'content-type': 'application/json',
          'content-length': '137',
          connection: 'close',
          'access-control-allow-credentials': 'true',
          'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
          'access-control-allow-origin': '*',
          'access-control-expose-headers': 'X-Stripe-Privileged-Session-Required,stripe-manage-version,X-Stripe-External-Auth-Required',
          'access-control-max-age': '300',
          'cache-control': 'no-cache, no-store',
          'request-id': 'req_pl8S3TRcwu3WXF',
          'stripe-version': '2017-06-05' },
       statusCode: 400,
       requestId: 'req_pl8S3TRcwu3WXF' },
    headers: 
     { server: 'nginx',
       date: 'Thu, 08 Feb 2018 19:30:28 GMT',
       'content-type': 'application/json',
       'content-length': '137',
       connection: 'close',
       'access-control-allow-credentials': 'true',
       'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE',
       'access-control-allow-origin': '*',
       'access-control-expose-headers': 'X-Stripe-Privileged-Session-Required,stripe-manage-version,X-Stripe-External-Auth-Required',
       'access-control-max-age': '300',
       'cache-control': 'no-cache, no-store',
       'request-id': 'req_pl8S3TRcwu3WXF',
       'stripe-version': '2017-06-05' },
    requestId: 'req_pl8S3TRcwu3WXF',
    statusCode: 400 }


Steps to reproduce the behavior

  • Create an order
  • Capture the payment and complete the order fulfilment
  • Select the order in the orders table
  • Click the capture button in the orders table

Versions

Node: 9.5.0
NPM: 5.6.0
Meteor Node: 8.9.3
Meteor NPM: 5.5.1
Reaction CLI: 0.27.0
Reaction: 1.8.0
Reaction branch: release-1.8.0
Docker: 18.01.0-ce

QA

QA by @kieckhafer + @cassytaylor

@zenweasel zenweasel added this to the Bugfix Sprint 1 milestone Feb 12, 2018

@spencern spencern modified the milestones: Bugfix Sprint 1, Release 1.9 Feb 20, 2018

@prinzdezibel prinzdezibel self-assigned this Feb 21, 2018

@prinzdezibel

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2018

@kieckhafer Is this a regression error? Asking because of the branch name.

@kieckhafer

This comment has been minimized.

Copy link
Member Author

commented Feb 21, 2018

@prinzdezibel No, all the errors in the bulk editor are not regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.