Merge pull request #6714 from turbo124/v5-develop

Fixes for braintree
This commit is contained in:
David Bomba 2021-09-24 20:30:03 +10:00 committed by GitHub
commit a4f285a2f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -54,4 +54,4 @@ PHANTOMJS_SECRET=secret
UPDATE_SECRET=secret
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
SENTRY_LARAVEL_DSN=https://cc7e8e2c678041689e53e409b7dba236@sentry.invoicing.co/5
SENTRY_LARAVEL_DSN=https://32f01ea994744fa08a0f688769cef78a@sentry.invoicing.co/9

View File

@ -153,7 +153,7 @@ 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');
$data['verificationMerchantAccountId'] = $this->braintree->company_gateway->getConfigField('merchantAccountId');
}
$response = $this->braintree->gateway->paymentMethod()->create($data);

View File

@ -61,6 +61,9 @@ class Number
// convert "," to "."
$s = str_replace(',', '.', $value);
if($value < 1)
return (float)$s;
// remove everything except numbers and dot "."
$s = preg_replace("/[^0-9\.]/", '', $s);