1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for braintree

This commit is contained in:
David Bomba 2021-09-22 07:35:57 +10:00
parent 2ec32a4781
commit 19910d2867
2 changed files with 5 additions and 3 deletions

View File

@ -151,6 +151,11 @@ class CreditCard
],
];
if ($this->braintree->company_gateway->getConfigField('merchantAccountId')) {
/** https://developer.paypal.com/braintree/docs/reference/request/transaction/sale/php#full-example */
$data['merchantAccountId'] = $this->braintree->company_gateway->getConfigField('merchantAccountId');
}
$response = $this->braintree->gateway->paymentMethod()->create($data);
if ($response->success) {

View File

@ -283,9 +283,6 @@ class Statement
$from = $ranges[0];
$to = $ranges[1];
nlog("from ".$from->format("Y-m-d"));
nlog("to ".$to->format("Y-m-d"));
$client = Client::where('id', $this->client->id)->first();
$amount = Invoice::where('company_id', $this->client->company->id)