khipu.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. // Copyright 2019 Hackware SpA <human@hackware.cl>
  3. // This file is part of "Hackware Web Services Payment" and licensed under
  4. // the terms of the GNU Affero General Public License version 3, or (at your
  5. // option) a later version. You should have received a copy of this license
  6. // along with the software. If not, see <https://www.gnu.org/licenses/>.
  7. return [
  8. 'class' => '\Hawese\Payment\Gateways\KhipuGateway',
  9. 'credentials' => [
  10. 'receiverId' => env('KHIPU_RECEIVER_ID'),
  11. 'secretKey' => env('KHIPU_SECRET_KEY'),
  12. ],
  13. 'payment_methods' => [
  14. 'purchase' => 'payment_method',
  15. ],
  16. 'schemas' => [
  17. 'purchase' => [
  18. 'required' => [
  19. 'subject',
  20. 'currency',
  21. 'amount',
  22. 'payer_email',
  23. 'payment_method',
  24. ],
  25. 'properties' => [
  26. 'subject' => [
  27. 'title' => 'Descripción',
  28. 'type' => 'string',
  29. ],
  30. 'currency' => [
  31. 'title' => 'Moneda',
  32. 'type' => 'string',
  33. 'enum' => ['CLP'],
  34. 'default' => 'CLP',
  35. 'readOnly' => true,
  36. ],
  37. 'amount' => [
  38. 'title' => 'Monto',
  39. 'type' => 'number',
  40. 'multipleOf' => 1,
  41. ],
  42. 'payer_email' => [
  43. 'title' => 'Email',
  44. 'type' => 'string',
  45. ],
  46. 'payment_method' => [ // for internal use, not sent to Khipu
  47. 'title' => 'Medio de pago',
  48. 'type' => 'string',
  49. 'oneOf' => [
  50. [
  51. 'const' => 'simplified_transfer',
  52. 'title' => 'Khipu',
  53. 'description' => (
  54. 'Transferencia bancaria por medio de app Khipu'
  55. ),
  56. ],
  57. [
  58. 'const' => 'transfer',
  59. 'title' => 'Transferencia',
  60. 'description' => 'Transferencia bancaria',
  61. ],
  62. ],
  63. ],
  64. ],
  65. ],
  66. ],
  67. ];