Skip to content

Commit

Permalink
Merge pull request #42 from uphold/bugfix/cancel-transaction
Browse files Browse the repository at this point in the history
Fix cancel transaction service
  • Loading branch information
SandroMachado committed Apr 27, 2016
2 parents 75afb52 + 4166446 commit 5609d46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Service/UserCardService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class UserCardService {
- returns: A request to cancel the transaction.
*/
static func cancelTransaction(cardId: String, transactionId: String) -> Request {
return UpholdClient().get(String(format: "/v0/me/cards/%@/transactions/%@/cancel", cardId, transactionId))
return UpholdClient().post(String(format: "/v0/me/cards/%@/transactions/%@/cancel", cardId, transactionId))
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Tests/Integration/Service/UserCardServiceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UserCardServiceTest: XCTestCase {
let request = UserCardService.cancelTransaction("bar", transactionId: "foo")

XCTAssertEqual(request.url, String(format: "%@/v0/me/cards/bar/transactions/foo/cancel", GlobalConfigurations.UPHOLD_API_URL), "Failed: Wrong URL.")
XCTAssertEqual(request.method, "GET", "Failed: Wrong method.")
XCTAssertEqual(request.method, "POST", "Failed: Wrong method.")
}

func testConfirmTransactionShouldReturnTheRequest() {
Expand Down

0 comments on commit 5609d46

Please sign in to comment.