{"_id":"@404-software/my-fatoorah","name":"@404-software/my-fatoorah","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@404-software/my-fatoorah","version":"1.0.0","author":{"name":"404 Software","email":"hello@404-software.com","url":"https://404-software.com"},"repository":{"type":"git","url":"git+https://github.com/404-Software/payment-gateways.git"},"main":"lib/index.js","scripts":{"dev":"tsx watch src/index.ts","build":"tsc","test":"jest --config jestconfig.json"},"license":"MIT","dependencies":{"axios":"^0.27.2"},"devDependencies":{"@types/jest":"^29.4.4","@types/node":"^18.14.6","dotenv":"^16.0.3","eslint":"^8.35.0","jest":"^29.5.0","prettier":"^2.8.4","ts-jest":"^29.0.5","tsc":"^2.0.4","tsx":"^3.12.3","typescript":"^4.9.5"},"types":"./lib/index.d.ts","gitHead":"173de3171a9389e16fce9c6035655b87924b2ba8","description":"This package provides helper functions to handle integration with My Fatoorah's API.","bugs":{"url":"https://github.com/404-Software/payment-gateways/issues"},"homepage":"https://github.com/404-Software/payment-gateways#readme","_id":"@404-software/my-fatoorah@1.0.0","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-s2r1BezDyel13KrCfHMum9q1oNaJI2kXS25WqMeUK8VaczAze7+di63PL80Xw4nco12CkuY0fovX28Y2Mv0utg==","shasum":"5f4d6bc4f537b13d46e5072fc7d0b9e1fed7de2c","tarball":"https://registry.npmjs.org/@404-software/my-fatoorah/-/my-fatoorah-1.0.0.tgz","fileCount":7,"unpackedSize":15873,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAgAhgEC4HdW0ZQLLksIrq1jDUIgcNKj7qOVAhJVvfS3AiEAsUHm3PPxj8OS7d9krBNFYwDNXeSzx+5ChK40j7e6MBM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIe6cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbDxAAl61NRAtYto1vK/Ramf/rjQa8YPEwZYwTGF5u7pCoAdqKbLUq\r\nZfgHspS1SKYTS2VhL0SxokcNDswRGq5dKi1dCvHE3oGms45ke4M4cUedoeqv\r\nAflV2aiYCvJ4/L3NRb2hv6zgcSIuY38MvkDyeqbLqhKapusWZzD9y+xRdKdd\r\nLud8smSTouKsK8pGPQwRMqsCiU+J9GMN8BYNz09qiFD8yQCQ8gNqTK/TyXc6\r\n/XQlsmKhlLazDbkJ7a1x3lAzh67JDQQAgBMXr3s9dr0eQkiHaiSBsfd44LmK\r\nrE2jIaNJn2QIxEGd4gmSH7+a2sFACZ6Fclc002AkXc/XyZPJerALUBkY8gvl\r\nJTaJDoZmxGGwk7ivmqQRNYi1AGpv4RMsLPw0Qy4rbWvGJ2eo/DmscaMO47za\r\nthWbV4yUdZ3PsVqIZInDj058rJyxnjR7ureEb8wkgjRnAcW9CfRhBBrx4PK5\r\nVa3OGIWxhG4GKaXKzVxEJJudUSuHqzfniEOqcmxBhAKej0KxmL1Wmye7Nxa6\r\nnI6jh0rLr2UUjtvZSmx6ZAtOXlgtLV34IPaoxVSkHElhxNVJXmYrm6GPNOmZ\r\nEyjMjjAytXganMT9Kowzqcnc+GiMJLoZy6iJUKsDBg5yk2ajT95+O9az3++/\r\n7TljtTjCrgKVb1826Dq9EPDNLetprXXymbA=\r\n=LAkW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alqassab","email":"ali@404-software.com"},"directories":{},"maintainers":[{"name":"alqassab","email":"ali@404-software.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/my-fatoorah_1.0.0_1679945372365_0.29109332767489837"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-27T19:29:32.288Z","1.0.0":"2023-03-27T19:29:32.587Z","modified":"2023-03-27T19:29:32.889Z"},"maintainers":[{"name":"alqassab","email":"ali@404-software.com"}],"description":"This package provides helper functions to handle integration with My Fatoorah's API.","homepage":"https://github.com/404-Software/payment-gateways#readme","repository":{"type":"git","url":"git+https://github.com/404-Software/payment-gateways.git"},"author":{"name":"404 Software","email":"hello@404-software.com","url":"https://404-software.com"},"bugs":{"url":"https://github.com/404-Software/payment-gateways/issues"},"license":"MIT","readme":"# About\n\nThis package provides helper functions to handle integration with My Fatoorah's API.\n\n<br/><br/>\n\n# How to use\n\nYou can set the following environment variables:\n\n```shell\nMY_FATOORAH_TOKEN=\"My Fatoorah Token\"\nMY_FATOORAH_TEST_MODE=false\n```\n\nor alternatively, you can pass these details to the config of the function directly.\n\n<br/><br/>\n\n# Example\n\n```typescript\nimport { myFatoorahInitiatePayment myFatoorahExecutePayment } from '@404-software/my-fatoorah'\n\nconst { Data: { PaymentMethods } } = await myFatoorahInitiatePayment({\n\trequest: {\n\t\tInvoiceAmount: 35.4,\n\t\tCurrencyIso: 'BHD',\n\t},\n\tconfig: {\n\t\ttoken: 'TOKEN',\n\t\ttestMode: false,\n\t},\n})\n\nconst paymentMethodId = PaymentMethods[0].PaymentMethodId\n\nconst { Data: { PaymentURL } } = await myFatoorahExecutePayment({\n\trequest: {\n\t\tInvoiceValue: 35.4,\n\t\tPaymentMethodId: paymentMethodId,\n    CallbackUrl: 'https://404-software.com/payment',\n    ErrorUrl: 'https://404-software.com/payment',\n\t},\n\tconfig: {\n\t\ttoken: 'TOKEN',\n\t\ttestMode: false,\n\t},\n})\n```\n","readmeFilename":"readme.md"}