Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
A
authorizenetwebform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
authorizenetwebform
Commits
5e98c275
Commit
5e98c275
authored
Nov 25, 2018
by
jenlampton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update that variable name that's been bugging me.
parent
fba380c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
authorizenetwebform.admin.inc
authorizenetwebform.admin.inc
+4
-4
authorizenetwebform.install
authorizenetwebform.install
+13
-5
authorizenetwebform.module
authorizenetwebform.module
+2
-2
No files found.
authorizenetwebform.admin.inc
View file @
5e98c275
...
...
@@ -10,7 +10,7 @@
function
authorizenetwebform_admin_settings
()
{
$form
=
array
();
$form
[
'authorizenetwebform_
url
'
]
=
array
(
$form
[
'authorizenetwebform_
mode
'
]
=
array
(
'#type'
=>
'radios'
,
'#title'
=>
t
(
'Transaction mode'
),
'#description'
=>
t
(
'Unless you are using a sandbox account, this should be set to Live.'
),
...
...
@@ -18,11 +18,11 @@ function authorizenetwebform_admin_settings() {
'main'
=>
t
(
'Live account'
),
'test'
=>
t
(
'Test (or Sandbox) account'
),
),
'#default_value'
=>
variable_get
(
'authorizenetwebform_
url
'
,
'main'
),
'#default_value'
=>
variable_get
(
'authorizenetwebform_
mode
'
,
'main'
),
);
// Add description text for URL choices.
$form
[
'authorizenetwebform_
url
'
][
'test'
][
'#description'
]
=
t
(
'Posts to https://test.authorize.net/gateway/transact.dll'
);
$form
[
'authorizenetwebform_
url
'
][
'main'
][
'#description'
]
=
t
(
'Posts to https://secure.authorize.net/gateway/transact.dll'
);
$form
[
'authorizenetwebform_
mode
'
][
'test'
][
'#description'
]
=
t
(
'Posts to https://test.authorize.net/gateway/transact.dll'
);
$form
[
'authorizenetwebform_
mode
'
][
'main'
][
'#description'
]
=
t
(
'Posts to https://secure.authorize.net/gateway/transact.dll'
);
$form
[
'login'
]
=
array
(
'#type'
=>
'fieldset'
,
...
...
authorizenetwebform.install
View file @
5e98c275
<?php
/**
* @file
* Authorize.Net Webform Module Installation File
...
...
@@ -41,9 +40,18 @@ function authorizenetwebform_schema() {
* Implements hook_uninstall().
*/
function
authorizenetwebform_uninstall
()
{
variable_del
(
"authorizenetwebform_login"
);
variable_del
(
"authorizenetwebform_transaction"
);
variable_del
(
"authorizenetwebform_custom_fields"
);
variable_del
(
"authorizenetwebform_url"
);
variable_del
(
'authorizenetwebform_login'
);
variable_del
(
'authorizenetwebform_transaction'
);
variable_del
(
'authorizenetwebform_custom_fields'
);
variable_del
(
'authorizenetwebform_url'
);
variable_del
(
'authorizenetwebform_client_key'
);
}
/**
* Implements hook_update_N. Changes a variable name.
*/
function
authorizenetwebform_update_7000
()
{
$mode
=
variable_get
(
'authorizenetwebform_url'
,
'main'
);
variable_set
(
'authorizenetwebform_mode'
,
$mode
);
variable_delete
(
'authorizenetwebform_url'
);
}
authorizenetwebform.module
View file @
5e98c275
...
...
@@ -156,7 +156,7 @@ function authorizenetwebform_form_webform_client_form_alter(&$form, &$form_state
// Add accept.js.
$js_url
=
'https://js.authorize.net/v1/Accept.js'
;
if
(
variable_get
(
'authorizenetwebform_
url
'
,
'main'
)
==
'test'
)
{
if
(
variable_get
(
'authorizenetwebform_
mode
'
,
'main'
)
==
'test'
)
{
$js_url
=
'https://jstest.authorize.net/v1/Accept.js'
;
}
...
...
@@ -377,7 +377,7 @@ function authorizenetwebform_webform_client_form_submit($form, &$form_state) {
// Set the post URL.
$post_url
=
'https://api.authorize.net/xml/v1/request.api'
;
if
(
variable_get
(
'authorizenetwebform_
url
'
,
'main'
)
==
'test'
)
{
if
(
variable_get
(
'authorizenetwebform_
mode
'
,
'main'
)
==
'test'
)
{
$post_url
=
'https://apitest.authorize.net/xml/v1/request.api'
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment