bagistoapi.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | BagistoApi Configuration
  5. |--------------------------------------------------------------------------
  6. |
  7. | Switches for the BagistoApi payment / express-checkout flow.
  8. |
  9. */
  10. return [
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Express Checkout
  14. |--------------------------------------------------------------------------
  15. |
  16. | express_checkout.enabled
  17. | Master switch for the quick (no email/address) payment path.
  18. |
  19. | express_checkout.cancel_without_address
  20. | Strategy for "registered customer cancels express payment AND order
  21. | has no shipping address" scenario:
  22. | - "cancel" (default) cancel the order immediately.
  23. | - "keep_pending" leave order pending; caller can call paymentReplay
  24. | later or operations team can intervene via the
  25. | `bagistoapi.express.cancel.no-address` event.
  26. |
  27. | express_checkout.placeholder_address
  28. | Placeholder address used for the pre-payment order when no real
  29. | shipping address is known yet. Re-written from the gateway response
  30. | on a successful capture callback.
  31. */
  32. 'express_checkout' => [
  33. 'enabled' => env('BAGISTOAPI_EXPRESS_CHECKOUT_ENABLED', true),
  34. 'cancel_without_address' => env('BAGISTOAPI_EXPRESS_CANCEL_WITHOUT_ADDRESS', 'cancel'),
  35. 'placeholder_address' => [
  36. 'first_name' => 'Express',
  37. 'last_name' => 'Checkout',
  38. 'email' => 'express-checkout@placeholder.local',
  39. 'address' => 'Pending gateway response',
  40. 'city' => 'Pending',
  41. 'state' => 'Pending',
  42. 'country' => 'US',
  43. 'postcode' => '00000',
  44. 'phone' => '0000000000',
  45. ],
  46. ],
  47. /*
  48. |--------------------------------------------------------------------------
  49. | Payment Reconciliation Job
  50. |--------------------------------------------------------------------------
  51. |
  52. | reconcile.enabled
  53. | Toggle the delayed reconciliation job that polls the gateway after
  54. | `delay_minutes` if the order is still PENDING.
  55. |
  56. | reconcile.delay_minutes
  57. | How long to wait before a pending order is reconciled against the
  58. | gateway.
  59. |
  60. | reconcile.queue
  61. | Name of the queue the reconciliation job is dispatched onto. Operators
  62. | can route this to a dead-letter capable broker (e.g. RabbitMQ) via the
  63. | Laravel queue config without touching code.
  64. */
  65. 'reconcile' => [
  66. 'enabled' => env('BAGISTOAPI_PAYMENT_RECONCILE_ENABLED', true),
  67. 'delay_minutes' => (int) env('BAGISTOAPI_PAYMENT_RECONCILE_DELAY', 15),
  68. 'queue' => env('BAGISTOAPI_PAYMENT_RECONCILE_QUEUE', 'payment-reconcile'),
  69. ],
  70. ];