Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

VENTransation+VenmoSDK transactionWithSignedRequestDictionary broken #100

Open
btrzupek opened this issue Oct 29, 2015 · 1 comment
Open
Assignees
Labels

Comments

@btrzupek
Copy link

The code has a comment stating that the response will be in this format:
// {
// "payments": [
// {
// "payment_id": "1234",
// "verb": "pay",
// "actor_user_id": "1",
// "target_user_id": "2",
// "amount": "1.00",
// "note": "Have a drink on me!",
// "success": 1
// }
// ]
// }
However, the response is actually in this format:
{
action = charge;
actor = {
about = " ";
"date_joined" = "2013-10-01T18:39:13";
"display_name" = "xxx";
"first_name" = xxx;
"friends_count" = 18;
id = ;
"is_active" = 1;
"is_blocked" = 0;
"is_group" = 0;
"last_name" = xxx;
"profile_picture_url" = "xxxx";
username = "xxxx";
};
amount = "-9.00";
audience = public;
"date_created" = "2015-10-29T21:21:38";
id = ;
medium = iphone;
note = "xxxxxx";
status = pending;
success = 1;
target = {
type = email;
};
}

This means that the following lines (as well as a few more):
transaction.transactionID = cleanDictionary[@"payment_id"];
NSString *transactionType = cleanDictionary[@"verb"];

need to be updated to reference the correct keys from the actual response dictionary. The correct keys being:
transaction.transactionID = cleanDictionary[@"id"];
NSString *transactionType = cleanDictionary[@"action"];

@btrzupek
Copy link
Author

Upon further review, either the server responses are somehow incorrect or this class has not been updated in quite some time. There are several items that are completely out of sync in here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants