Skip to content

Commit 029a5a4

Browse files
committed
Implemented automatic settlement. Fixes #13
1 parent 2fc3251 commit 029a5a4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/class.plugify-gform-braintree.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ protected function authorize( $feed, $submission_data, $form, $entry ) {
100100
Braintree_Configuration::publicKey( $settings['public-key'] );
101101
Braintree_Configuration::privateKey( $settings['private-key'] );
102102

103+
// Set to auto settlemt if applicable
104+
if( $settings['settlement'] == 'Yes' ) {
105+
$args['options']['submitForSettlement'] = 'true';
106+
}
107+
103108
// Send transaction to Braintree
104109
$result = Braintree_Transaction::sale( $args );
105110

0 commit comments

Comments
 (0)