-
Notifications
You must be signed in to change notification settings - Fork 198
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
How do you set 'includeTransactions'? #102
Comments
Could somebody paste the required code to get the recent transactions from the Get Subscription SDK call? |
@sjordan1975 I fiddled and fiddled and ended up making a php curl call using json just for that specific request. I will look at your forked project. Thanks for your help |
I suspect that includeTransactions support has been implemented in the underlying Authorize.net API; however, the PHP SDK is woefully out of date. And no sample code has been forthcoming from Authorize.net (earliest request is from June 2016) So, for my purposes, I forked the PHP SDK: I implemented get ARB Transaction from Get Subscription sufficient for what I needed. Specifically, I modified the following 4 files: Immediately after setting setSubscriptionID in the sample code (https://github.com/AuthorizeNet/sample-code-php/blob/master/RecurringBilling/get-subscription-status.php) add the following:
Note: I have used TransactionDetailsType whereas I suspect the actual type should be something like ARBTransactionType, but the yaml definition is missing and I have not defined it The result is for now not all transaction data is populated; HOWEVER, transId IS populated and this is good enough to make an additional API call to get Transaction Details. Feel free to have at it. Code provided AS IS to the Community. YMMV |
This is coming soon in the SDKs and we'll make sure to include it in sample code as well. We're trying to keep not more than a month behind API updates but the latest release has been a little delayed. |
includeTransactions has been added to the ARBGetSubscription request as part of the latest release! |
@ashtru Thank you. I'll check it out. It would also be nice to update the sample code to demonstrate how to use this functionality. |
Thanks @sjordan1975 . The sample code is updated. Happy Coding! |
Hi @ashtru I see you updated the sample code to set I think it would be helpful to update the section of code which displays results... Example Current code snippet:
I suggest something like the follow (see comments inline):
The goal is to help future devs as much as possible; you want to make it easy for people to use and want to use the SDK (IMHO) I integrated the updated code into my codebase and it's working. Thank you. However ... I noticed that from the documentation for
There is no success flag/code for payment. If I want to know if a payment was actually successful, I have to check the value of This seems very fragile and prone to potential error if the SDK message changes even slightly in the future. I might suggest a success code of some kind. |
Thanks again for the suggestion, @sjordan1975 . @kikmak42 has updated the sample code . Happy Coding! |
The AuthorizeNet documentation references being able to set includeTransactions property:
How is this done with the SDK?
Similar to #280
Thank you
The text was updated successfully, but these errors were encountered: