Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
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
brienne
Developer Documentation
Commits
ef34381b
Unverified
Commit
ef34381b
authored
6 years ago
by
mattwire
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #596 from eileenmcnaughton/patch-5
Remove the most painfully out of date parts of this page
parents
5ecd8f11
184d0105
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/extensions/payment-processors/create.md
+2
-46
2 additions, 46 deletions
docs/extensions/payment-processors/create.md
with
2 additions
and
46 deletions
docs/extensions/payment-processors/create.md
+
2
−
46
View file @
ef34381b
...
...
@@ -85,17 +85,7 @@ It should have this basic template.
```
php
<?php
require_once
'CRM/Core/Payment.php'
;
class
edu_ucmerced_payment_ucmpaymentcollection
extends
CRM_Core_Payment
{
/**
* We only need one instance of this object. So we use the singleton
* pattern and cache the instance in this variable
*
* @var object
* @static
*/
static
private
$_singleton
=
null
;
/**
* mode of operation: live or test
...
...
@@ -118,23 +108,6 @@ class edu_ucmerced_payment_ucmpaymentcollection extends CRM_Core_Payment {
$this
->
_processorName
=
ts
(
'UC Merced Payment Collection'
);
}
/**
* singleton function used to manage this object
*
* @param string $mode the mode of operation: live or test
*
* @return object
* @static
*
*/
static
function
&
singleton
(
$mode
,
&
$paymentProcessor
)
{
$processorName
=
$paymentProcessor
[
'name'
];
if
(
self
::
$_singleton
[
$processorName
]
===
null
)
{
self
::
$_singleton
[
$processorName
]
=
new
edu_ucmerced_payment_ucmpaymentcollection
(
$mode
,
$paymentProcessor
);
}
return
self
::
$_singleton
[
$processorName
];
}
/**
* This function checks to see if we have the right config values
*
...
...
@@ -158,10 +131,6 @@ class edu_ucmerced_payment_ucmpaymentcollection extends CRM_Core_Payment {
}
}
function
doDirectPayment
(
&
$params
)
{
CRM_Core_Error
::
fatal
(
ts
(
'This function is not implemented'
));
}
/**
* Sets appropriate parameters for checking out to UCM Payment Collection
*
...
...
@@ -171,7 +140,7 @@ class edu_ucmerced_payment_ucmpaymentcollection extends CRM_Core_Payment {
* @access public
*
*/
function
do
TransferCheckou
t
(
&
$params
,
$component
)
{
function
do
Paymen
t
(
&
$params
,
$component
)
{
}
}
...
...
@@ -197,17 +166,6 @@ function __construct( $mode, &$paymentProcessor ) {
}
```
This method should call your class name
```
php
static
function
&
singleton
(
$mode
,
&
$paymentProcessor
)
{
$processorName
=
$paymentProcessor
[
'name'
];
if
(
self
::
$_singleton
[
$processorName
]
===
null
)
{
self
::
$_singleton
[
$processorName
]
=
new
edu_ucmerced_payment_ucmpaymentcollection
(
$mode
,
$paymentProcessor
);
}
return
self
::
$_singleton
[
$processorName
];
}
```
You need to process the data given to you in the doTransferCheckout()
method. Here is an example of how it's done in this processor
...
...
@@ -216,7 +174,7 @@ method. Here is an example of how it's done in this processor
**UCMPaymentCollection.php-doTransferCheckout**
```
php
function
do
TransferCheckou
t
(
&
$params
,
$component
)
{
function
do
Paymen
t
(
&
$params
,
$component
)
{
// Start building our paramaters.
// We get this from the user_name field even though in our info.xml file we specified it was called "Purchase Item ID"
$UCMPaymentCollectionParams
[
'purchaseItemId'
]
=
$this
->
_paymentProcessor
[
'user_name'
];
...
...
@@ -315,8 +273,6 @@ amount of changes needed.
```
php
<?php
require_once
'CRM/Core/Payment/BaseIPN.php'
;
class
edu_ucmerced_payment_ucmpaymentcollection_UCMPaymentCollectionIPN
extends
CRM_Core_Payment_BaseIPN
{
/**
...
...
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