Skip to content

Conversation

@yaychris
Copy link

This commit resolves the issue identified in #2247.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the linked issue you mention

"capture" test cases were rejected because I did not provide the OrderID.

Why is it that the order_id from the authorization did not work in your case? Line 584 (the top of this method) attempts to extract it from the authorization, which is what would be typically expected in an auth and capture flow. Is that behavior buggy? It seems weird to me that you'd have to pass this in separately when trying to capture an auth.

Copy link
Author

Choose a reason for hiding this comment

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

Apologies for not being more detailed in the issue.

To my knowledge, that behavior is not buggy. However, it only works if you performed the auth using Active Merchant. I'm using Chase's Hosted Pay Form, which performs the auth in an iframe and provides the authorization token. I send the token to the server and capture there, using Active Merchant.

This can be resolved by combining the token and order ID into a string, like Active Merchant does. That's non obvious, though. Given:

  1. Chase requires both the authorization token and the order ID to be certified for production;
  2. There are two common ways to perform an auth outside of Active Merchant (Hosted Pay Form and Hosted Pay Page);
  3. Combining into a string breaks encapsulation by requiring my app to know about Active Merchant's internals (authorization_string, which does the combining, is a private method); and
  4. This change preserves existing behavior

It seems reasonable to make this a first-class parameter, rather than tacking it on to the authorization.

@bpollack bpollack added the gateway/feature Adds a new feature to an existing gateway label Jun 25, 2018
@bpollack
Copy link
Contributor

@jasonwebster Is this something you're still interested in landing?

@albaer
Copy link

albaer commented Jun 29, 2018

Hi! I'm interested in getting this PR merged, if that's still on the table, and I'd be happy to help if I can. I'm working with the iframe auth/server capture setup Chris described above, and it would be nice to be able to pass in the order id.

@bpollack bpollack self-assigned this Jun 29, 2018
@bpollack
Copy link
Contributor

Awesome, I'll look @albaer . I've been going through and cleaning up/landing a lot of PRs, but it's a slow burn. I'll try to get you feedback within the next week or so.

@bpollack bpollack removed their assignment Jul 11, 2018
@bpollack
Copy link
Contributor

@albaer What would you need to update this and help land it?

@albaer
Copy link

albaer commented Aug 27, 2018

I'm not sure. If adding this option is good with you, I can just rebase it, make sure everything is all set with contribution guidelines and documentation, and then let you know. How does that sound?

@joeyjoejoejr joeyjoejoejr force-pushed the 2247-orbital-capture-order-id branch from 843eb53 to 2c3e095 Compare December 4, 2018 17:03
@joeyjoejoejr
Copy link
Contributor

@bpollack I was just talking to some coworkers, and they said they had this open. It's been rebased and should be ready to go. Let me know if there are any changes you would need to it.

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

Labels

gateway/feature Adds a new feature to an existing gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants