| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | BagistoApi Configuration
- |--------------------------------------------------------------------------
- |
- | Switches for the BagistoApi payment / express-checkout flow.
- |
- */
- return [
- /*
- |--------------------------------------------------------------------------
- | Express Checkout
- |--------------------------------------------------------------------------
- |
- | express_checkout.enabled
- | Master switch for the quick (no email/address) payment path.
- |
- | express_checkout.cancel_without_address
- | Strategy for "registered customer cancels express payment AND order
- | has no shipping address" scenario:
- | - "cancel" (default) cancel the order immediately.
- | - "keep_pending" leave order pending; caller can call paymentReplay
- | later or operations team can intervene via the
- | `bagistoapi.express.cancel.no-address` event.
- |
- | express_checkout.placeholder_address
- | Placeholder address used for the pre-payment order when no real
- | shipping address is known yet. Re-written from the gateway response
- | on a successful capture callback.
- */
- 'express_checkout' => [
- 'enabled' => env('BAGISTOAPI_EXPRESS_CHECKOUT_ENABLED', true),
- 'cancel_without_address' => env('BAGISTOAPI_EXPRESS_CANCEL_WITHOUT_ADDRESS', 'cancel'),
- 'placeholder_address' => [
- 'first_name' => 'Express',
- 'last_name' => 'Checkout',
- 'email' => 'express-checkout@placeholder.local',
- 'address' => 'Pending gateway response',
- 'city' => 'Pending',
- 'state' => 'Pending',
- 'country' => 'US',
- 'postcode' => '00000',
- 'phone' => '0000000000',
- ],
- ],
- /*
- |--------------------------------------------------------------------------
- | Frontend URLs
- |--------------------------------------------------------------------------
- |
- | frontend.reset_password_url
- | Generic base URL of the reset-password page on the headless frontend,
- | e.g. https://shop.example.com/reset-password. Used when no device
- | specific URL below is configured.
- |
- | frontend.reset_password_url_pc / frontend.reset_password_url_mobile
- | Device specific base URLs. PC requests use reset_password_url_pc,
- | mobile requests use reset_password_url_mobile (detected from the
- | X-Device-Type header or the User-Agent).
- |
- | The token and email are appended as query parameters
- | (?token=...&email=...). When every option is empty, emails fall back to
- | the built-in Shop storefront page.
- */
- 'frontend' => [
- 'reset_password_url' => env('FRONTEND_RESET_PASSWORD_URL', ''),
- 'reset_password_url_pc' => env('FRONTEND_RESET_PASSWORD_URL_PC', ''),
- 'reset_password_url_mobile' => env('FRONTEND_RESET_PASSWORD_URL_MOBILE', ''),
- ],
- /*
- |--------------------------------------------------------------------------
- | Payment Reconciliation Job
- |--------------------------------------------------------------------------
- |
- | reconcile.enabled
- | Toggle the reconciliation job that polls the gateway while the order
- | is still PENDING.
- |
- | The job re-schedules itself. All values below are in SECONDS and are
- | measured from the anchor time (order creation, or the most recent
- | `redirected` payment attempt when the buyer used paymentReplay):
- |
- | reconcile.early_marks
- | Fixed early probes, e.g. [30, 60, 300] = 30s, 1min, 5min.
- |
- | reconcile.interval
- | Polling interval once the early probes are done (default 3 min).
- |
- | reconcile.late_after / reconcile.late_interval
- | After `late_after` seconds the interval widens to `late_interval`
- | (default: after 30 min, poll every 5 min).
- |
- | reconcile.max_seconds
- | Hard stop. A PayPal order expires after roughly 3 hours, so polling
- | past that point cannot tell us anything new.
- |
- | reconcile.queue
- | Name of the queue the reconciliation job is dispatched onto. This must
- | be consumed by a worker, and the Redis instance backing it must not
- | evict keys (see the package README).
- */
- 'reconcile' => [
- 'enabled' => env('BAGISTOAPI_PAYMENT_RECONCILE_ENABLED', true),
- 'early_marks' => [30, 60, 300],
- 'interval' => (int) env('BAGISTOAPI_PAYMENT_RECONCILE_INTERVAL', 180),
- 'late_after' => (int) env('BAGISTOAPI_PAYMENT_RECONCILE_LATE_AFTER', 1800),
- 'late_interval' => (int) env('BAGISTOAPI_PAYMENT_RECONCILE_LATE_INTERVAL', 300),
- 'max_seconds' => (int) env('BAGISTOAPI_PAYMENT_RECONCILE_MAX_SECONDS', 10800),
- 'queue' => env('BAGISTOAPI_PAYMENT_RECONCILE_QUEUE', 'payment-reconcile'),
- ],
- ];
|