mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on importing Forte customers
This commit is contained in:
parent
fc61065e69
commit
0a87aeaf8f
@ -1072,6 +1072,28 @@ class CreateSingleAccount extends Command
|
|||||||
$cg->save();
|
$cg->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config('ninja.testvars.forte') && ($this->gateway == 'all' || $this->gateway == 'forte')) {
|
||||||
|
$cg = new CompanyGateway();
|
||||||
|
$cg->company_id = $company->id;
|
||||||
|
$cg->user_id = $user->id;
|
||||||
|
$cg->gateway_key = 'kivcvjexxvdiyqtj3mju5d6yhpeht2xs';
|
||||||
|
$cg->require_cvv = true;
|
||||||
|
$cg->require_billing_address = true;
|
||||||
|
$cg->require_shipping_address = true;
|
||||||
|
$cg->update_details = true;
|
||||||
|
$cg->config = encrypt(config('ninja.testvars.forte'));
|
||||||
|
$cg->save();
|
||||||
|
|
||||||
|
$gateway_types = $cg->driver()->gatewayTypes();
|
||||||
|
|
||||||
|
$fees_and_limits = new stdClass();
|
||||||
|
$fees_and_limits->{$gateway_types[0]} = new FeesAndLimits();
|
||||||
|
|
||||||
|
$cg->fees_and_limits = $fees_and_limits;
|
||||||
|
$cg->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,4 +220,15 @@ class EwayPaymentDriver extends BaseDriver
|
|||||||
return (bool) count($response->getErrors()) == 0;
|
return (bool) count($response->getErrors()) == 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* importCustomers
|
||||||
|
*
|
||||||
|
* No support
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function importCustomers()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,8 +204,29 @@ class FortePaymentDriver extends BaseDriver
|
|||||||
return $response->successful();
|
return $response->successful();
|
||||||
|
|
||||||
}
|
}
|
||||||
// public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash)
|
|
||||||
// {
|
public function importCustomers()
|
||||||
// return $this->payment_method->yourTokenBillingImplmentation();
|
{
|
||||||
// }
|
|
||||||
|
$forte_base_uri = "https://sandbox.forte.net/api/v3/";
|
||||||
|
if ($this->company_gateway->getConfigField('testMode') == false) {
|
||||||
|
$forte_base_uri = "https://api.forte.net/v3/";
|
||||||
|
}
|
||||||
|
$forte_api_access_id = $this->company_gateway->getConfigField('apiAccessId');
|
||||||
|
$forte_secure_key = $this->company_gateway->getConfigField('secureKey');
|
||||||
|
$forte_auth_organization_id = $this->company_gateway->getConfigField('authOrganizationId');
|
||||||
|
$forte_organization_id = $this->company_gateway->getConfigField('organizationId');
|
||||||
|
$forte_location_id = $this->company_gateway->getConfigField('locationId');
|
||||||
|
|
||||||
|
$response = Http::withBasicAuth($forte_api_access_id, $forte_secure_key)
|
||||||
|
->withHeaders(['X-Forte-Auth-Organization-Id' => $forte_organization_id])
|
||||||
|
->get("{$forte_base_uri}/organizations/{$forte_organization_id}/locations/{$forte_location_id}/customers/");
|
||||||
|
|
||||||
|
if($response->successful()){
|
||||||
|
|
||||||
|
nlog($response->json());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,7 @@ return [
|
|||||||
'stripe' => env('STRIPE_KEYS', ''),
|
'stripe' => env('STRIPE_KEYS', ''),
|
||||||
'paypal' => env('PAYPAL_KEYS', ''),
|
'paypal' => env('PAYPAL_KEYS', ''),
|
||||||
'ppcp' => env('PPCP_KEYS', ''),
|
'ppcp' => env('PPCP_KEYS', ''),
|
||||||
|
'forte' => env('FORTE_KEYS', ''),
|
||||||
'paypal_rest' => env('PAYPAL_REST_KEYS', ''),
|
'paypal_rest' => env('PAYPAL_REST_KEYS', ''),
|
||||||
'authorize' => env('AUTHORIZE_KEYS', ''),
|
'authorize' => env('AUTHORIZE_KEYS', ''),
|
||||||
'checkout' => env('CHECKOUT_KEYS', ''),
|
'checkout' => env('CHECKOUT_KEYS', ''),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user