khipu.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. // Copyright 2019-2022 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. 'countries' => ['CL'],
  10. 'credentials' => [
  11. 'receiverId' => env('KHIPU_RECEIVER_ID'),
  12. 'secretKey' => env('KHIPU_SECRET_KEY'),
  13. ],
  14. 'payment_methods' => [
  15. 'purchase' => 'payment_method',
  16. ],
  17. 'schemas' => [
  18. 'purchase' => [
  19. 'required' => [
  20. 'subject',
  21. 'currency',
  22. 'amount',
  23. 'payer_email',
  24. 'payment_method',
  25. ],
  26. 'standard_map' => [
  27. 'subject' => 'subject',
  28. 'email' => 'payer_email',
  29. 'due_amount' => 'amount',
  30. 'payment_method' => 'payment_method',
  31. 'currency' => 'currency'
  32. ],
  33. 'properties' => [
  34. 'subject' => [
  35. 'title' => 'Descripción',
  36. 'type' => 'string',
  37. ],
  38. 'currency' => [
  39. 'title' => 'Moneda',
  40. 'type' => 'string',
  41. 'enum' => ['CLP'],
  42. 'default' => 'CLP',
  43. 'readOnly' => true,
  44. ],
  45. 'amount' => [
  46. 'title' => 'Monto',
  47. 'type' => 'number',
  48. 'multipleOf' => 1,
  49. ],
  50. 'payer_email' => [
  51. 'title' => 'Email',
  52. 'type' => 'string',
  53. ],
  54. 'payment_method' => [ // for internal use, not sent to Khipu
  55. 'title' => 'Medio de pago',
  56. 'type' => 'string',
  57. 'oneOf' => [
  58. [
  59. 'const' => 'simplified_transfer',
  60. 'title' => 'Khipu',
  61. 'description' => (
  62. 'Transferencia bancaria por medio de app Khipu'
  63. ),
  64. 'image' => env('APP_URL') .
  65. '/img/payment_methods/khipu.svg',
  66. ],
  67. [
  68. 'const' => 'transfer',
  69. 'title' => 'Transferencia',
  70. 'description' => 'Transferencia bancaria',
  71. 'image' => env('APP_URL') .
  72. '/img/payment_methods/khipu_transfer.svg',
  73. ],
  74. ],
  75. ],
  76. ],
  77. ],
  78. ],
  79. ];