Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gravity-forms-braintree.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://plugify.io/
Description: Allow your customers to purchase goods and services through Gravity Forms via Braintree Payments
Author: Plugify
Version: 1.1.1
Version: 1.1.2
Author URI: http://plugify.io
*/

Expand Down
22 changes: 22 additions & 0 deletions lib/class.plugify-gfaddonfeedstable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// Plugify_GForm_Braintree class

final class Plugify_GFAddOnFeedsTable extends GFAddOnFeedsTable {

// The only thing we are overriding in this class is the "column_is_active" functionality
function column_is_active ( $item ) {

$is_active = intval(rgar($item, "is_active"));
$src = GFCommon::get_base_url() . "/images/active{$is_active}.png";

$title = $is_active ? __("Active", "gravityforms") : __("Inactive", "gravityforms");
$img = sprintf( "<img src=\"{$src}\" class=\"toggle_active\" title=\"{$title}\" data-feed-id=\"%s\" style=\"cursor:pointer\";/>", $item['id'] );

return $img;

}

}

?>
15 changes: 12 additions & 3 deletions lib/class.plugify-gform-braintree.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function init_frontend () {
* @since 1.0
* @return void
*/
protected function authorize( $feed, $submission_data, $form, $entry ) {
public function authorize( $feed, $submission_data, $form, $entry ) {

// Prepare authorization response payload
$authorization = array(
Expand Down Expand Up @@ -92,7 +92,16 @@ protected function authorize( $feed, $submission_data, $form, $entry ) {
'expirationDate' => sprintf( '%s/%s', $submission_data['card_expiration_date'][0], $submission_data['card_expiration_date'][1]),
'cardholderName' => $submission_data['card_name'],
'cvv' => $submission_data['card_security_code']
)
),
'customer' => array(
'firstName' => $submission_data['card_name']
),
'billing' => array(
'firstName' => $submission_data['card_name'],
'streetAddress' => $submission_data['address'],
'locality' => $submission_data['city'],
'postalCode' => $submission_data['zip']
)
);

try {
Expand Down Expand Up @@ -162,7 +171,7 @@ public function feed_settings_fields () {
$settings = parent::feed_settings_fields();

// Remove billing information
$settings = $this->remove_field( 'billingInformation', $settings );
//$settings = $this->remove_field( 'billingInformation', $settings );

// Remove options
$settings = $this->remove_field( 'options', $settings );
Expand Down
12 changes: 7 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hello
Tags: credit card,braintree,gravity form,payment
Requires at least: 3.8
Tested up to: 3.9
Stable tag: 1.1.1
Stable tag: 1.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -54,13 +54,15 @@ Not currently, no. This will be released very shortly in version 1.1
No filters are currently available for this pre-release version

== Screenshots ==
1. You will be initially greeted with the empty feed page, prompting you to configure your Braintree settings.
2. Page for configuring your Braintree settings, such as Merchant ID
3. Configuring a Gravity Forms Braintree feed
4. List of active feeds
1. Easily configure your Braintree settings, allowing for quick and efficient setup.
2. Quickly and easily configure payment feeds under Form Settings of any Gravity Form
3. List of active feeds on the current form

== Changelog ==

= 1.1.2 =
* Internal maintenance release. Version 1.2 is coming soon and it's going to be big!

= 1.1.1 =
* Dashes and spaces are now removed from credit card number before sending to Braintree

Expand Down