forked from activemerchant/active_merchant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test Fixes activemerchant#2172 Move create_token call from store to purchase The return value of store will now have the card id rather than a (single-use) token. We will request a new token each time we do a purchase. Only request a new token if purchase is called with the card id as a String. In that case, replace the card id with the token before continuing. Otherwise, complete the purchase using whatever was passed in, which should be the full card details. Avoid Undefined method errors by making sure the id is always returned as a String. This ensures the authorization_from method always returns the same type. Retrieve the payment id from the response to use in the url for the next API call. It is not getting passed correctly in r.authorization. Tests now pass. Add failing test for an authorization based on a token. If authorize is called with a card id, then swap it for a single-use token before proceeding. Simplify handling of the single-use token.
- Loading branch information
Showing
2 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters