braintree / braintree_php_example

An example Braintree integration for PHP
MIT License
127 stars 94 forks source link

should include option 'submitForSettlement' in Braintree_Transaction::sale() method #11

Closed phannam1412 closed 8 years ago

phannam1412 commented 8 years ago

hello, thank for the great example.

One small thing, can you include option 'submitForSettlement' in the code as follows:

$result = Braintree_Transaction::sale([ 'amount' => '10.00', 'paymentMethodNonce' => nonceFromTheClient, 'options' => [ 'submitForSettlement' => True ] ]);

mtmarsh3 commented 8 years ago

Hi @phannam1412,

Thanks for the suggestion! We agree that this is a worthwhile change for the repository. If you make a pull request with the update, we'll merge it in!

DavidWard1980 commented 8 years ago

$result=Braintree_Transaction::sale([ 'amount'='0.00', 'PaymentMethodnonce=>nonceFromTheClient, 'options'=> [ 'submitForSettlement=>True ] ]);

Yes that would be nice!!

ghost commented 8 years ago

@phannam1412 Braintree suggest that, mainly because you dont have to go into the braintree and manually submitting settlements which can be time consuming

mtmarsh3 commented 8 years ago

Thanks @phannam1412 ! Your PR has been merged, so I'm going to close this issue.