1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Separate cc/ach fees

This commit is contained in:
Hillel Coren 2017-03-26 12:01:34 +03:00
parent e0a397c199
commit 12c7b8ab9f
3 changed files with 6 additions and 3 deletions

View File

@ -91,7 +91,8 @@ WEPAY_ENVIRONMENT=production # production or stage
WEPAY_AUTO_UPDATE=true # Requires permission from WePay WEPAY_AUTO_UPDATE=true # Requires permission from WePay
WEPAY_ENABLE_CANADA=true WEPAY_ENABLE_CANADA=true
WEPAY_FEE_PAYER=payee WEPAY_FEE_PAYER=payee
WEPAY_APP_FEE_MULTIPLIER=0.002 WEPAY_APP_FEE_CC_MULTIPLIER=0
WEPAY_APP_FEE_ACH_MULTIPLIER=0
WEPAY_APP_FEE_FIXED=0 WEPAY_APP_FEE_FIXED=0
WEPAY_THEME='{"name":"Invoice Ninja","primary_color":"0b4d78","secondary_color":"0b4d78","background_color":"f8f8f8","button_color":"33b753"}' # See https://www.wepay.com/developer/reference/structures#theme WEPAY_THEME='{"name":"Invoice Ninja","primary_color":"0b4d78","secondary_color":"0b4d78","background_color":"f8f8f8","button_color":"33b753"}' # See https://www.wepay.com/developer/reference/structures#theme

View File

@ -56,12 +56,14 @@ class WePayPaymentDriver extends BasePaymentDriver
$data['transaction_id'] = $transactionId; $data['transaction_id'] = $transactionId;
} }
$data['applicationFee'] = (env('WEPAY_APP_FEE_MULTIPLIER') * $data['amount']) + env('WEPAY_APP_FEE_FIXED');
$data['feePayer'] = env('WEPAY_FEE_PAYER'); $data['feePayer'] = env('WEPAY_FEE_PAYER');
$data['callbackUri'] = $this->accountGateway->getWebhookUrl(); $data['callbackUri'] = $this->accountGateway->getWebhookUrl();
if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER, $paymentMethod)) { if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER, $paymentMethod)) {
$data['paymentMethodType'] = 'payment_bank'; $data['paymentMethodType'] = 'payment_bank';
$data['applicationFee'] = (env('WEPAY_APP_FEE_ACH_MULTIPLIER') * $data['amount']) + env('WEPAY_APP_FEE_FIXED');
} else {
$data['applicationFee'] = (env('WEPAY_APP_FEE_CC_MULTIPLIER') * $data['amount']) + env('WEPAY_APP_FEE_FIXED');
} }
$data['transaction_rbits'] = $this->invoice()->present()->rBits; $data['transaction_rbits'] = $this->invoice()->present()->rBits;

View File

@ -2055,7 +2055,7 @@ $LANG = array(
'changes_take_effect_immediately' => 'Note: changes take effect immediately', 'changes_take_effect_immediately' => 'Note: changes take effect immediately',
'wepay_account_description' => 'Payment gateway for Invoice Ninja', 'wepay_account_description' => 'Payment gateway for Invoice Ninja',
'payment_error_code' => 'There was an error processing your payment [:code]. Please try again later.', 'payment_error_code' => 'There was an error processing your payment [:code]. Please try again later.',
'standard_fees_apply' => 'Standard fees apply: 2.9% + $0.30 per successful charge.', 'standard_fees_apply' => 'Fee: 2.9%/1.2% [Credit Card/Bank Transfer] + $0.30 per successful charge.',
'limit_import_rows' => 'Data needs to be imported in batches of :count rows or less', 'limit_import_rows' => 'Data needs to be imported in batches of :count rows or less',
'error_title' => 'Something went wrong', 'error_title' => 'Something went wrong',
'error_contact_text' => 'If you\'d like help please email us at :mailaddress', 'error_contact_text' => 'If you\'d like help please email us at :mailaddress',