{"id":17017292,"url":"https://github.com/avour/kivypaystack","last_synced_at":"2025-03-22T15:27:35.378Z","repository":{"id":165971210,"uuid":"195542291","full_name":"avour/kivypaystack","owner":"avour","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-08T21:56:25.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T15:46:17.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-06T13:25:58.000Z","updated_at":"2019-10-04T21:44:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"04d65f41-a119-4656-bab8-e19f9006fd25","html_url":"https://github.com/avour/kivypaystack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avour%2Fkivypaystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avour%2Fkivypaystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avour%2Fkivypaystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avour%2Fkivypaystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avour","download_url":"https://codeload.github.com/avour/kivypaystack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244976875,"owners_count":20541558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T06:36:15.654Z","updated_at":"2025-03-22T15:27:35.339Z","avatar_url":"https://github.com/avour.png","language":"Python","readme":"# kivypaystack\n\nA port of paystack payment system to support the kivy framework \n\nIt uses the builtin UrlRequest class to make asynchronous requests on the web and get the result when the\nrequest is completed, so no external module is needed\n\n- Charge the customer\n- Verify a transaction\n- Create Plans\n- Get a single or all transactions\n- Get a single or all customers\n\n\n##Installation\npip it away\n\n ```python\npip install -U kivypaystack\n```\n\nRegister on the paystack website https://www.paystack.com and get your Authorization key.  \nyou can store your authorization key in your environment variable as \"PAYSTACK_AUTHORIZATION_KEY\" or pass it into the  \nany kivypaystack objects at initiatialization.\n\n##Examples\n\n```python\nfrom kivypaystack import Transaction, Customer, Plan\n\n\"\"\"\nAll objects at initialization, recieves an optional callback func\n\"\"\"\n\ndef transaction_callback(action, result_type, request, result):\n    ''' action: reponse action performed EG: transaction.charge(\"customer@domain.com\", \"CustomerAUTHcode\", 10000)\n                on callback action will be 'charge' \n\n        result_type:  can be 'success', 'failure', 'redirect', 'error'\n\n        request: instance of kivy.urlrequest.UrlRequest\n\n        result: a decided json dictionary\n    '''\n    if action == 'charge':  # if a charge transaction was passed\n        print(result_type, result)\n\n    if action == 'verify':\n        print(result_type, result)\n\n\n#Instantiate the transaction object to handle transactions.  \n#Pass in your authorization key - if not set as environment variable PAYSTACK_AUTHORIZATION_KEY\n# warning use public key not your secret key\ntransaction = Transaction(authorization_key=\"pk_myauthorizationkeyfromthepaystackguys\", callback=transaction_callback)\nresponse = transaction.charge(\"customer@domain.com\", \"CustomerAUTHcode\", 10000) #Charge a customer N100.\nresponse  = transaction.verify(refcode) #Verify a transaction given a reference code \"refcode\".\n\n\n#Instantiate the customer class to manage customers\n\ncustomer = Customer(authorization_key=\"pk_myauthorizationkeyfromthepaystackguys\")\nresponse = customer.create(\"customer2@gmail.com\", \"John\", \"Doe\", phone=\"080123456789\") #Add new customer\nresponse = customer.getone(1234) #Get customer with id of 1234\nresponse = customer.getall() #Get all customers\n\n\n#Instantiate the plan class to manage plans\n\nplan = Plan(authorization_key=\"pk_myauthorizationkeyfromthepaystackguys\")\nresponse = plan.create(\"Test Plan\", 150000, 'Weekly') #Add new plan\nresponse = plan.getone(240) #Get plan with id of 240\nresponse = plan.getall() #Get all plans\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favour%2Fkivypaystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favour%2Fkivypaystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favour%2Fkivypaystack/lists"}