Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
usaepay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
usaepay
Commits
bb35525a
Commit
bb35525a
authored
7 years ago
by
josetorres
Browse files
Options
Downloads
Patches
Plain Diff
cleanup drupal specific code
parent
e7c0a838
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/v3/Usaepay/Fetchtransactions.php
+0
-12
0 additions, 12 deletions
api/v3/Usaepay/Fetchtransactions.php
with
0 additions
and
12 deletions
api/v3/Usaepay/Fetchtransactions.php
+
0
−
12
View file @
bb35525a
...
...
@@ -26,9 +26,6 @@ function _civicrm_api3_usaepay_fetchtransactions_spec(&$spec) {
function
civicrm_api3_usaepay_fetchtransactions
(
$params
)
{
if
(
array_key_exists
(
'sourcekey'
,
$params
))
{
watchdog
(
'usaepay-apiparams'
,
'<pre>'
.
print_r
(
$params
,
1
)
.
'</pre>'
);
//for live server use 'www' for test server use 'sandbox'
$wsdl
=
'https://sandbox.usaepay.com/soap/gate/0AE595C1/usaepay.wsdl'
;
...
...
@@ -59,7 +56,6 @@ function civicrm_api3_usaepay_fetchtransactions($params) {
);
$recent
=
usaepay_recentFetchSuccess
();
watchdog
(
'usaepay-recent'
,
'<pre>'
.
print_r
(
$recent
,
1
)
.
'</pre>'
);
try
{
// Create search parameter list
...
...
@@ -74,32 +70,24 @@ function civicrm_api3_usaepay_fetchtransactions($params) {
'Value'
=>
'0'
),
);
$start
=
0
;
$limit
=
999
;
$matchall
=
true
;
$sort
=
'created'
;
watchdog
(
'usaepay-search'
,
'<pre>'
.
print_r
(
$search
,
1
)
.
'</pre>'
);
//RUN transaction search
$res
=
$client
->
searchTransactions
(
$token
,
$search
,
$matchall
,
$start
,
$limit
,
$sort
);
//Make nice (non-object) array
$resarray
=
json_decode
(
json_encode
(
$res
->
Transactions
),
true
);
watchdog
(
'usaepay-results'
,
'<pre>'
.
print_r
(
$resarray
,
1
)
.
'</pre>'
);
//Get only relevant infomation
$relevant
=
usaepay_getRelevant
(
$resarray
,
$sourcename
);
watchdog
(
'usaepay-relevant'
,
'<pre>'
.
print_r
(
$relevant
,
1
)
.
'</pre>'
);
//look in CiviCRM for mathcing contribution, return only NEW payments not in DB
$contributionsNew
=
usaepay_getNewContibutions
(
$relevant
);
watchdog
(
'usaepay-new'
,
'<pre>'
.
print_r
(
$contributionsNew
,
1
)
.
'</pre>'
);
$contributionsAdded
=
usaepay_addRecurringContributionPayment
(
$contributionsNew
);
watchdog
(
'usaepay-added'
,
'<pre>'
.
print_r
(
$contributionsAdded
,
1
)
.
'</pre>'
);
// Retrun results
return
civicrm_api3_create_success
(
$contributionsAdded
,
$params
,
'NewEntity'
,
'NewAction'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment