dana-python 1.1.3__tar.gz → 1.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dana_python-1.1.3/dana_python.egg-info → dana_python-1.1.4}/PKG-INFO +1 -1
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/enum.py +1 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/consult_pay_payment_info.py +3 -3
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/pay_option_detail.py +3 -3
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/pay_option_info.py +3 -3
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/finish_notify_payment_info.py +7 -7
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/finish_notify_request.py +0 -14
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/finish_notify_request_additional_info.py +7 -2
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/webhook.py +24 -9
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/enum.py +1 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/pay_option_info.py +3 -3
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/util.py +1 -1
- {dana_python-1.1.3 → dana_python-1.1.4/dana_python.egg-info}/PKG-INFO +1 -1
- {dana_python-1.1.3 → dana_python-1.1.4}/pyproject.toml +1 -1
- dana_python-1.1.4/tests/test_webhook.py +66 -0
- dana_python-1.1.3/tests/test_webhook.py +0 -60
- {dana_python-1.1.3 → dana_python-1.1.4}/LICENSE +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/README.md +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/api_client.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/api_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/base/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/base/configuration.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/base/model.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/base/types.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/api/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/api/disbursement_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/enum.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_response_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/dana_account_inquiry_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/dana_account_inquiry_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/dana_account_inquiry_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/money.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_inquiry_status_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_inquiry_status_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_inquiry_status_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_inquiry_status_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/exceptions.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/api/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/api/merchant_management_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/enum.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/address_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/business_docs.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_request_ext_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_division_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/division_resource_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/merchant_resource_information.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/mobile_no_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/pic_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_merchant_resource_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_merchant_resource_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_merchant_resource_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_merchant_resource_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_merchant_resource_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_shop_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_shop_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_shop_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_shop_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_shop_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/result_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/shop_resource_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_division_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_division_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_division_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_division_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_division_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_shop_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_shop_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_shop_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/update_shop_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/user_name.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/api/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/api/payment_gateway_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/actor_context.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/amount_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/audit_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/buyer.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/cancel_order_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/cancel_order_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/consult_pay_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/consult_pay_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/consult_pay_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_by_api_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_by_api_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_by_redirect_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_by_redirect_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/create_order_response_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/env_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/goods.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/money.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/order_api_object.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/order_redirect_object.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/pay_option_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/payment_view.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/promo_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/query_payment_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/query_payment_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/query_payment_response_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/refund_option_bill.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/refund_order_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/refund_order_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/refund_order_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/seller.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/shipping_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/status_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/time_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/url_param.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/virtual_account_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/rest.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/models.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/open_api_configuration.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/open_api_header.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/script.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/snap_configuration.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/snap_header.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/utils/url.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/finish_notify_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/money.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/pay_option_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/shop_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/api/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/api/widget_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/__init__.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/account_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/account_unbinding_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/account_unbinding_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/account_unbinding_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/amount_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_ott_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_ott_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_ott_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_ott_response_user_resources_inner.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_token_authorization_code_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_token_refresh_token_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_token_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_token_response_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/apply_token_response_additional_info_user_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/balance_inquiry_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/balance_inquiry_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/balance_inquiry_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/buyer.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/cancel_order_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/cancel_order_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/env_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/goods.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/international_order_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/international_order_info_exchange_rate.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/money.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/oauth2_url_data.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/oauth2_url_data_seamless_data.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/order.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/pay_option_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/pay_option_detail_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/payment_promo_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/payment_view.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_payment_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_payment_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_payment_response_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_user_profile_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_user_profile_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_user_profile_response_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_user_profile_response_response_body.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/query_user_profile_response_response_head.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/refund_order_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/refund_order_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/refund_order_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/refund_promo_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/result_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/seller.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/service_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/shipping_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/status_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/time_detail.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/url_param.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/user_resource_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/virtual_account_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/widget_payment_request.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/widget_payment_request_additional_info.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana/widget/v1/models/widget_payment_response.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana_python.egg-info/SOURCES.txt +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana_python.egg-info/dependency_links.txt +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana_python.egg-info/requires.txt +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/dana_python.egg-info/top_level.txt +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/setup.cfg +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_disbursement_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_merchant_management_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_payment_gateway_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_payment_gateway_with_automation.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_widget_api.py +0 -0
- {dana_python-1.1.3 → dana_python-1.1.4}/tests/test_widget_with_automation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dana-python
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: API Client (SDK) for DANA APIs based on https://dashboard.dana.id/api-docs
|
|
5
5
|
Author-email: DANA Package Manager <package-manager@dana.id>
|
|
6
6
|
Maintainer-email: DANA Package Manager <package-manager@dana.id>
|
|
@@ -33,6 +33,7 @@ class PayOption(str, Enum):
|
|
|
33
33
|
NETWORK_PAY_PG_GOPAY = "NETWORK_PAY_PG_GOPAY"
|
|
34
34
|
NETWORK_PAY_PG_LINKAJA = "NETWORK_PAY_PG_LINKAJA"
|
|
35
35
|
NETWORK_PAY_PG_CARD = "NETWORK_PAY_PG_CARD"
|
|
36
|
+
NETWORK_PAY_PC_INDOMARET = "NETWORK_PAY_PC_INDOMARET"
|
|
36
37
|
VIRTUAL_ACCOUNT_BCA = "VIRTUAL_ACCOUNT_BCA"
|
|
37
38
|
VIRTUAL_ACCOUNT_BNI = "VIRTUAL_ACCOUNT_BNI"
|
|
38
39
|
VIRTUAL_ACCOUNT_MANDIRI = "VIRTUAL_ACCOUNT_MANDIRI"
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/payment_gateway/v1/models/consult_pay_payment_info.py
RENAMED
|
@@ -47,7 +47,7 @@ class ConsultPayPaymentInfo(BaseModel, BaseSdkModel):
|
|
|
47
47
|
ConsultPayPaymentInfo
|
|
48
48
|
""" # noqa: E501
|
|
49
49
|
pay_method: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment method that used to payment. The enums:<br> * BALANCE - Payment method with balance<br> * COUPON - Payment method with coupon<br> * NET_BANKING - Payment method with internet banking<br> * CREDIT_CARD - Payment method with credit card<br> * DEBIT_CARD - Payment method with debit card<br> * VIRTUAL_ACCOUNT - Payment method with virtual account<br> * OTC - Payment method with OTC<br> * DIRECT_DEBIT_CREDIT_CARD - Payment method with direct debit of credit card<br> * DIRECT_DEBIT_DEBIT_CARD - Payment method with direct debit of debit card<br> * ONLINE_CREDIT - Payment method with online Credit<br> * LOAN_CREDIT - Payment method with DANA Cicil<br> * NETWORK_PAY - Payment method with e-wallet<br> * CARD - Payment method with card<br> ")
|
|
50
|
-
pay_option: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(default=None, description="Payment option that available to used to payment, depends on the payment method. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
50
|
+
pay_option: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(default=None, description="Payment option that available to used to payment, depends on the payment method. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * NETWORK_PAY_PC_INDOMARET - Payment method with Indomaret<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
51
51
|
promo_infos: Optional[List[PromoInfo]] = Field(default=None, description="Additional Information of promotion")
|
|
52
52
|
__properties: ClassVar[List[str]] = ["payMethod", "payOption", "promoInfos"]
|
|
53
53
|
|
|
@@ -66,8 +66,8 @@ class ConsultPayPaymentInfo(BaseModel, BaseSdkModel):
|
|
|
66
66
|
if not value:
|
|
67
67
|
return value
|
|
68
68
|
|
|
69
|
-
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
70
|
-
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
69
|
+
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
70
|
+
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
71
71
|
return value
|
|
72
72
|
|
|
73
73
|
model_config = ConfigDict(
|
|
@@ -48,7 +48,7 @@ class PayOptionDetail(BaseModel, BaseSdkModel):
|
|
|
48
48
|
PayOptionDetail
|
|
49
49
|
""" # noqa: E501
|
|
50
50
|
pay_method: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment method that used to payment. The enums:<br> * BALANCE - Payment method with balance<br> * COUPON - Payment method with coupon<br> * NET_BANKING - Payment method with internet banking<br> * CREDIT_CARD - Payment method with credit card<br> * DEBIT_CARD - Payment method with debit card<br> * VIRTUAL_ACCOUNT - Payment method with virtual account<br> * OTC - Payment method with OTC<br> * DIRECT_DEBIT_CREDIT_CARD - Payment method with direct debit of credit card<br> * DIRECT_DEBIT_DEBIT_CARD - Payment method with direct debit of debit card<br> * ONLINE_CREDIT - Payment method with online Credit<br> * LOAN_CREDIT - Payment method with DANA Cicil<br> * NETWORK_PAY - Payment method with e-wallet<br> * CARD - Payment method with card<br> ")
|
|
51
|
-
pay_option: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment option that available to used to payment, depends on the payment method. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * NETWORK_PAY_PG_QRIS - Payment method with QRIS<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
51
|
+
pay_option: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment option that available to used to payment, depends on the payment method. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * NETWORK_PAY_PG_QRIS - Payment method with QRIS<br> * NETWORK_PAY_PC_INDOMARET - Payment method with Indomaret<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
52
52
|
trans_amount: Money = Field()
|
|
53
53
|
fee_amount: Optional[Money] = Field(default=None)
|
|
54
54
|
card_token: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Token that used for payment with card")
|
|
@@ -70,8 +70,8 @@ class PayOptionDetail(BaseModel, BaseSdkModel):
|
|
|
70
70
|
"""Validates the enum"""
|
|
71
71
|
if value == "":
|
|
72
72
|
return value
|
|
73
|
-
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PG_QRIS', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
74
|
-
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PG_QRIS', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
73
|
+
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PG_QRIS', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
74
|
+
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PG_QRIS', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
75
75
|
return value
|
|
76
76
|
|
|
77
77
|
model_config = ConfigDict(
|
|
@@ -47,7 +47,7 @@ class PayOptionInfo(BaseModel, BaseSdkModel):
|
|
|
47
47
|
PayOptionInfo
|
|
48
48
|
""" # noqa: E501
|
|
49
49
|
pay_method: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment method name. The enums:<br> * BALANCE - Payment method with balance<br> * COUPON - Payment method with coupon<br> * NET_BANKING - Payment method with internet banking<br> * CREDIT_CARD - Payment method with credit card<br> * DEBIT_CARD - Payment method with debit card<br> * VIRTUAL_ACCOUNT - Payment method with virtual account<br> * OTC - Payment method with OTC<br> * DIRECT_DEBIT_CREDIT_CARD - Payment method with direct debit of credit card<br> * DIRECT_DEBIT_DEBIT_CARD - Payment method with direct debit of debit card<br> * ONLINE_CREDIT - Payment method with online Credit<br> * LOAN_CREDIT - Payment method with DANA Cicil<br> * NETWORK_PAY - Payment method with e-wallet * CARD - Payment method with Card ")
|
|
50
|
-
pay_option: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Payment option which shows the provider of this payment. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
50
|
+
pay_option: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Payment option which shows the provider of this payment. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * NETWORK_PAY_PC_INDOMARET - Payment method with Indomaret<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
51
51
|
pay_amount: Optional[Money] = Field(default=None, description="Pay amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
52
52
|
trans_amount: Optional[Money] = Field(default=None, description="Trans amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
53
53
|
charge_amount: Optional[Money] = Field(default=None, description="Charge amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
@@ -71,8 +71,8 @@ class PayOptionInfo(BaseModel, BaseSdkModel):
|
|
|
71
71
|
if not value:
|
|
72
72
|
return value
|
|
73
73
|
|
|
74
|
-
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
75
|
-
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
74
|
+
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
75
|
+
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
76
76
|
return value
|
|
77
77
|
|
|
78
78
|
model_config = ConfigDict(
|
|
@@ -46,8 +46,8 @@ class FinishNotifyPaymentInfo(BaseModel, BaseSdkModel):
|
|
|
46
46
|
"""
|
|
47
47
|
FinishNotifyPaymentInfo
|
|
48
48
|
""" # noqa: E501
|
|
49
|
-
cashier_request_id: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Cashier request identifier")
|
|
50
|
-
paid_time: Annotated[str, Field(strict=True, max_length=25)] = Field(description="Information of paid time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)")
|
|
49
|
+
cashier_request_id: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(description="Cashier request identifier")
|
|
50
|
+
paid_time: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(description="Information of paid time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)")
|
|
51
51
|
pay_option_infos: List[PayOptionInfo] = Field(description="Information of pay option. Refer to payOptionInfos for the detailed")
|
|
52
52
|
pay_request_extend_info: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Extend information of pay request")
|
|
53
53
|
extend_info: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Extend information")
|
|
@@ -56,7 +56,7 @@ class FinishNotifyPaymentInfo(BaseModel, BaseSdkModel):
|
|
|
56
56
|
@field_validator('paid_time')
|
|
57
57
|
def paid_time_validate_regular_expression(cls, value):
|
|
58
58
|
"""Validates the regular expression"""
|
|
59
|
-
if not re.match(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$", value):
|
|
59
|
+
if value is not None and not re.match(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$", value):
|
|
60
60
|
raise ValueError(r"must validate the regular expression /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$/")
|
|
61
61
|
return value
|
|
62
62
|
|
|
@@ -119,11 +119,11 @@ class FinishNotifyPaymentInfo(BaseModel, BaseSdkModel):
|
|
|
119
119
|
return cls.model_validate(obj)
|
|
120
120
|
|
|
121
121
|
_obj = cls.model_validate({
|
|
122
|
-
"cashierRequestId": obj.get("cashierRequestId"),
|
|
123
|
-
"paidTime": obj.get("paidTime"),
|
|
122
|
+
"cashierRequestId": obj.get("cashierRequestId") if obj.get("cashierRequestId") is not None else None,
|
|
123
|
+
"paidTime": obj.get("paidTime") if obj.get("paidTime") is not None else None,
|
|
124
124
|
"payOptionInfos": [PayOptionInfo.from_dict(_item) for _item in obj["payOptionInfos"]] if obj.get("payOptionInfos") is not None else None,
|
|
125
|
-
"payRequestExtendInfo": obj.get("payRequestExtendInfo"),
|
|
126
|
-
"extendInfo": obj.get("extendInfo")
|
|
125
|
+
"payRequestExtendInfo": obj.get("payRequestExtendInfo") if obj.get("payRequestExtendInfo") is not None else None,
|
|
126
|
+
"extendInfo": obj.get("extendInfo") if obj.get("extendInfo") is not None else None
|
|
127
127
|
})
|
|
128
128
|
return _obj
|
|
129
129
|
|
|
@@ -61,20 +61,6 @@ class FinishNotifyRequest(BaseModel, BaseSdkModel):
|
|
|
61
61
|
additional_info: Optional[FinishNotifyRequestAdditionalInfo] = Field(default=None, description="Additional information")
|
|
62
62
|
__properties: ClassVar[List[str]] = ["originalPartnerReferenceNo", "originalReferenceNo", "originalExternalId", "merchantId", "subMerchantId", "amount", "latestTransactionStatus", "transactionStatusDesc", "createdTime", "finishedTime", "externalStoreId", "additionalInfo"]
|
|
63
63
|
|
|
64
|
-
@field_validator('created_time')
|
|
65
|
-
def created_time_validate_regular_expression(cls, value):
|
|
66
|
-
"""Validates the regular expression"""
|
|
67
|
-
if not re.match(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$", value):
|
|
68
|
-
raise ValueError(r"must validate the regular expression /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$/")
|
|
69
|
-
return value
|
|
70
|
-
|
|
71
|
-
@field_validator('finished_time')
|
|
72
|
-
def finished_time_validate_regular_expression(cls, value):
|
|
73
|
-
"""Validates the regular expression"""
|
|
74
|
-
if not re.match(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$", value):
|
|
75
|
-
raise ValueError(r"must validate the regular expression /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+07:00$/")
|
|
76
|
-
return value
|
|
77
|
-
|
|
78
64
|
model_config = ConfigDict(
|
|
79
65
|
populate_by_name=True,
|
|
80
66
|
validate_assignment=True,
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/webhook/finish_notify_request_additional_info.py
RENAMED
|
@@ -52,6 +52,7 @@ class FinishNotifyRequestAdditionalInfo(BaseModel, BaseSdkModel):
|
|
|
52
52
|
extend_info: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Additional information of extend (As a JSON string)")
|
|
53
53
|
extend_info_closed_reason: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Additional information of closed reason. Required if order is closed")
|
|
54
54
|
__properties: ClassVar[List[str]] = ["paymentInfo", "shopInfo", "extendInfo", "extendInfo.closedReason"]
|
|
55
|
+
paid_time: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="Information of paid time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)")
|
|
55
56
|
|
|
56
57
|
model_config = ConfigDict(
|
|
57
58
|
populate_by_name=True,
|
|
@@ -99,6 +100,9 @@ class FinishNotifyRequestAdditionalInfo(BaseModel, BaseSdkModel):
|
|
|
99
100
|
# override the default output from pydantic by calling `to_dict()` of shop_info
|
|
100
101
|
if self.shop_info:
|
|
101
102
|
_dict['shopInfo'] = self.shop_info.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of paid_time
|
|
104
|
+
if self.paid_time:
|
|
105
|
+
_dict['paidTime'] = self.paid_time
|
|
102
106
|
return _dict
|
|
103
107
|
|
|
104
108
|
@classmethod
|
|
@@ -113,8 +117,9 @@ class FinishNotifyRequestAdditionalInfo(BaseModel, BaseSdkModel):
|
|
|
113
117
|
_obj = cls.model_validate({
|
|
114
118
|
"paymentInfo": FinishNotifyPaymentInfo.from_dict(obj["paymentInfo"]) if obj.get("paymentInfo") is not None else None,
|
|
115
119
|
"shopInfo": ShopInfo.from_dict(obj["shopInfo"]) if obj.get("shopInfo") is not None else None,
|
|
116
|
-
"
|
|
117
|
-
"extendInfo
|
|
120
|
+
"paidTime": obj.get("paidTime") if obj.get("paidTime") is not None else None,
|
|
121
|
+
"extendInfo": obj.get("extendInfo") if obj.get("extendInfo") is not None else None,
|
|
122
|
+
"extendInfo.closedReason": obj.get("extendInfo.closedReason") if obj.get("extendInfo.closedReason") is not None else None,
|
|
118
123
|
})
|
|
119
124
|
return _obj
|
|
120
125
|
|
|
@@ -98,9 +98,19 @@ class WebhookParser:
|
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
@staticmethod
|
|
101
|
-
def
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
def _ensure_minified_json(json_str: str) -> tuple[str, Exception]:
|
|
102
|
+
"""
|
|
103
|
+
Ensures JSON string is minified
|
|
104
|
+
Returns tuple of (minified_json, error)
|
|
105
|
+
"""
|
|
106
|
+
try:
|
|
107
|
+
obj = json.loads(json_str)
|
|
108
|
+
minified = json.dumps(obj, separators=(",", ":"))
|
|
109
|
+
return minified, None
|
|
110
|
+
except json.JSONDecodeError as e:
|
|
111
|
+
return "", e
|
|
112
|
+
except Exception as e:
|
|
113
|
+
return "", e
|
|
104
114
|
|
|
105
115
|
@staticmethod
|
|
106
116
|
def _sha256_lower_hex(data: str) -> str:
|
|
@@ -112,10 +122,13 @@ class WebhookParser:
|
|
|
112
122
|
relative_path_url: str,
|
|
113
123
|
body: str,
|
|
114
124
|
x_timestamp: str
|
|
115
|
-
) -> str:
|
|
116
|
-
minified_body = self.
|
|
125
|
+
) -> tuple[str, Exception]:
|
|
126
|
+
minified_body, err = self._ensure_minified_json(body)
|
|
127
|
+
if err:
|
|
128
|
+
return "", Exception(f"_construct_string_to_verify: failed to ensure JSON is minified: {err}")
|
|
129
|
+
|
|
117
130
|
body_hash = self._sha256_lower_hex(minified_body)
|
|
118
|
-
return f"{http_method}:{relative_path_url}:{body_hash}:{x_timestamp}"
|
|
131
|
+
return f"{http_method}:{relative_path_url}:{body_hash}:{x_timestamp}", None
|
|
119
132
|
|
|
120
133
|
def parse_webhook(
|
|
121
134
|
self,
|
|
@@ -124,18 +137,20 @@ class WebhookParser:
|
|
|
124
137
|
headers: dict,
|
|
125
138
|
body: str
|
|
126
139
|
) -> FinishNotifyRequest:
|
|
127
|
-
x_signature = headers.get("X-SIGNATURE")
|
|
128
|
-
x_timestamp = headers.get("X-TIMESTAMP")
|
|
140
|
+
x_signature = headers.get("X-SIGNATURE") or headers.get("X-Signature") or headers.get("X-signature") or headers.get("x-signature")
|
|
141
|
+
x_timestamp = headers.get("X-TIMESTAMP") or headers.get("X-Timestamp") or headers.get("X-timestamp") or headers.get("x-timestamp")
|
|
129
142
|
|
|
130
143
|
if not x_signature or not x_timestamp:
|
|
131
144
|
raise ValueError("Missing X-SIGNATURE or X-TIMESTAMP header.")
|
|
132
145
|
|
|
133
|
-
string_to_verify = self._construct_string_to_verify(
|
|
146
|
+
string_to_verify, err = self._construct_string_to_verify(
|
|
134
147
|
http_method=http_method,
|
|
135
148
|
relative_path_url=relative_path_url,
|
|
136
149
|
body=body,
|
|
137
150
|
x_timestamp=x_timestamp
|
|
138
151
|
)
|
|
152
|
+
if err:
|
|
153
|
+
raise ValueError(str(err))
|
|
139
154
|
signature_bytes = base64.b64decode(x_signature)
|
|
140
155
|
|
|
141
156
|
try:
|
|
@@ -88,6 +88,7 @@ class PayOption(str, Enum):
|
|
|
88
88
|
NETWORK_PAY_PG_GOPAY = "NETWORK_PAY_PG_GOPAY"
|
|
89
89
|
NETWORK_PAY_PG_LINKAJA = "NETWORK_PAY_PG_LINKAJA"
|
|
90
90
|
NETWORK_PAY_PG_CARD = "NETWORK_PAY_PG_CARD"
|
|
91
|
+
NETWORK_PAY_PC_INDOMARET = "NETWORK_PAY_PC_INDOMARET"
|
|
91
92
|
VIRTUAL_ACCOUNT_BCA = "VIRTUAL_ACCOUNT_BCA"
|
|
92
93
|
VIRTUAL_ACCOUNT_BNI = "VIRTUAL_ACCOUNT_BNI"
|
|
93
94
|
VIRTUAL_ACCOUNT_MANDIRI = "VIRTUAL_ACCOUNT_MANDIRI"
|
|
@@ -47,7 +47,7 @@ class PayOptionInfo(BaseModel, BaseSdkModel):
|
|
|
47
47
|
PayOptionInfo
|
|
48
48
|
""" # noqa: E501
|
|
49
49
|
pay_method: Annotated[str, Field(strict=True, max_length=64)] = Field(description="Payment method name. The enums:<br> * BALANCE - Payment method with balance<br> * COUPON - Payment method with coupon<br> * NET_BANKING - Payment method with internet banking<br> * CREDIT_CARD - Payment method with credit card<br> * DEBIT_CARD - Payment method with debit card<br> * VIRTUAL_ACCOUNT - Payment method with virtual account<br> * OTC - Payment method with OTC<br> * DIRECT_DEBIT_CREDIT_CARD - Payment method with direct debit of credit card<br> * DIRECT_DEBIT_DEBIT_CARD - Payment method with direct debit of debit card<br> * ONLINE_CREDIT - Payment method with online Credit<br> * LOAN_CREDIT - Payment method with DANA Cicil<br> * NETWORK_PAY - Payment method with e-wallet * CARD - Payment method with Card ")
|
|
50
|
-
pay_option: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Payment option which shows the provider of this payment. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
50
|
+
pay_option: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Payment option which shows the provider of this payment. The enums:<br> * NETWORK_PAY_PG_SPAY - Payment method with ShopeePay e-wallet<br> * NETWORK_PAY_PG_OVO - Payment method with OVO e-wallet<br> * NETWORK_PAY_PG_GOPAY - Payment method with GoPay e-wallet<br> * NETWORK_PAY_PG_LINKAJA - Payment method with LinkAja e-wallet<br> * NETWORK_PAY_PG_CARD - Payment method with Card<br> * NETWORK_PAY_PC_INDOMARET - Payment method with Indomaret<br> * VIRTUAL_ACCOUNT_BCA - Payment method with BCA virtual account<br> * VIRTUAL_ACCOUNT_BNI - Payment method with BNI virtual account<br> * VIRTUAL_ACCOUNT_MANDIRI - Payment method with Mandiri virtual account<br> * VIRTUAL_ACCOUNT_BRI - Payment method with BRI virtual account<br> * VIRTUAL_ACCOUNT_BTPN - Payment method with BTPN virtual account<br> * VIRTUAL_ACCOUNT_CIMB - Payment method with CIMB virtual account<br> * VIRTUAL_ACCOUNT_PERMATA - Payment method with Permata virtual account<br> ")
|
|
51
51
|
pay_amount: Optional[Money] = Field(default=None, description="Pay amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
52
52
|
trans_amount: Optional[Money] = Field(default=None, description="Trans amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
53
53
|
charge_amount: Optional[Money] = Field(default=None, description="Charge amount. Contains two sub-fields:<br> 1. Value: Transaction amount, including the cents<br> 2. Currency: Currency code based on ISO<br> ")
|
|
@@ -69,8 +69,8 @@ class PayOptionInfo(BaseModel, BaseSdkModel):
|
|
|
69
69
|
if value is None:
|
|
70
70
|
return value
|
|
71
71
|
|
|
72
|
-
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
73
|
-
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
72
|
+
if value not in set(['NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA']):
|
|
73
|
+
raise ValueError("must be one of enum values ('NETWORK_PAY_PG_SPAY', 'NETWORK_PAY_PG_OVO', 'NETWORK_PAY_PG_GOPAY', 'NETWORK_PAY_PG_LINKAJA', 'NETWORK_PAY_PG_CARD', 'NETWORK_PAY_PC_INDOMARET', 'VIRTUAL_ACCOUNT_BCA', 'VIRTUAL_ACCOUNT_BNI', 'VIRTUAL_ACCOUNT_MANDIRI', 'VIRTUAL_ACCOUNT_BRI', 'VIRTUAL_ACCOUNT_BTPN', 'VIRTUAL_ACCOUNT_CIMB', 'VIRTUAL_ACCOUNT_PERMATA')")
|
|
74
74
|
return value
|
|
75
75
|
|
|
76
76
|
model_config = ConfigDict(
|
|
@@ -90,7 +90,7 @@ class Util:
|
|
|
90
90
|
|
|
91
91
|
# Get scopes based on environment
|
|
92
92
|
if hasattr(data, 'scopes') and data.scopes:
|
|
93
|
-
scopes = data.scopes
|
|
93
|
+
scopes = ','.join(data.scopes)
|
|
94
94
|
else:
|
|
95
95
|
if env.lower() != 'production':
|
|
96
96
|
scopes = 'CASHIER,AGREEMENT_PAY,QUERY_BALANCE,DEFAULT_BASIC_PROFILE,MINI_DANA'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dana-python
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: API Client (SDK) for DANA APIs based on https://dashboard.dana.id/api-docs
|
|
5
5
|
Author-email: DANA Package Manager <package-manager@dana.id>
|
|
6
6
|
Maintainer-email: DANA Package Manager <package-manager@dana.id>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright 2025 PT Espay Debit Indonesia Koe
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import os
|
|
17
|
+
from dana.webhook.finish_notify_request import FinishNotifyRequest
|
|
18
|
+
from dana.webhook import WebhookParser
|
|
19
|
+
from dana.utils.snap_header import SnapHeader
|
|
20
|
+
# Import fixtures directly from their modules to avoid circular imports
|
|
21
|
+
from tests.fixtures.api_client import api_instance_payment_gateway
|
|
22
|
+
from tests.fixtures.payment_gateway import webhook_key_pair
|
|
23
|
+
|
|
24
|
+
class TestWebhookParser:
|
|
25
|
+
def test_webhook_signature_and_parsing_success(self):
|
|
26
|
+
# Load keys from environment variables
|
|
27
|
+
public_key = os.getenv("WEBHOOK_PUBLIC_KEY")
|
|
28
|
+
|
|
29
|
+
webhook_http_method = "POST"
|
|
30
|
+
webhook_relative_url = "/api/v2/test-notif/dana"
|
|
31
|
+
|
|
32
|
+
webhook_body_str = '{"amount":{"currency":"IDR","value":"100000.00"},"originalReferenceNo":"20250916111230999500166191900293793","merchantId":"216620080007039826152","latestTransactionStatus":"00","additionalInfo":{"paidTime":"1757998714761","paymentInfo":{"payOptionInfos":[{"transAmount":{"currency":"IDR","value":"100000.00"},"payAmount":{"currency":"IDR","value":"100000.00"},"payMethod":"NETWORK_PAY","payOption":"NETWORK_PAY_PG_LINKAJA"}],"extendInfo":"{\\"externalPromoInfos\\":[]}"}},"originalPartnerReferenceNo":"LINKIT25091757998646","createdTime":"1757998647000","finishedTime":"1757998714761","transactionStatusDesc":"SUCCESS"}'
|
|
33
|
+
|
|
34
|
+
x_timestamp = "2025-09-16T12:11:30+07:00"
|
|
35
|
+
signature = "d/7mle7A+FCl4zvBZ2dMr3s7TVbbaK+toMtZwoev4OmLhn6Ctz/ynMaL3m3vHjAmV3UL3Fq5xp9thZFsO8BY74Vehqr1N9LQblV6i3TfMwT6lMvvhzWr0Fjbasyj23c5nFu1MOxpBiZFMMDNh8GQNLBAehHbjOmNldXSL6OQYRrK/TN9tdDyYFK6ltnKf4BN6bZa2ViAlI/np/U3QBW2LnDL82+8ZK7tYVF5bZyLLUSLXeWXBGQFTSDWqN+JdUHSnxGdQr3hZ7Y9Vqm/7G6rj6NrCxLPiEJYq1DQO3DjokMsORA2lOxzuo53bwqmhmD1mFhJKWF1JmyJuFdo2HB9JA=="
|
|
36
|
+
|
|
37
|
+
headers = {
|
|
38
|
+
"Channel-Id": "DANA",
|
|
39
|
+
"Charset": "UTF-8",
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
"User-Agent": "Jakarta Commons-HttpClient/3.1",
|
|
42
|
+
"X-External-Id": "cFQ0PK5yS9wkMTMOVem4fIoUuyuA28jg",
|
|
43
|
+
"X-Partner-Id": "2025090110410957288340",
|
|
44
|
+
"X-Signature": signature,
|
|
45
|
+
"X-Timestamp": x_timestamp
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Create the parser with the public key
|
|
49
|
+
parser = WebhookParser(public_key=public_key)
|
|
50
|
+
|
|
51
|
+
# Verify and parse
|
|
52
|
+
result = parser.parse_webhook(
|
|
53
|
+
http_method=webhook_http_method,
|
|
54
|
+
relative_path_url=webhook_relative_url,
|
|
55
|
+
headers=headers,
|
|
56
|
+
body=webhook_body_str
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Verify specific fields like in the Go test
|
|
60
|
+
assert result is not None
|
|
61
|
+
assert result.original_partner_reference_no == "LINKIT25091757998646"
|
|
62
|
+
assert result.original_reference_no == "20250916111230999500166191900293793"
|
|
63
|
+
assert result.merchant_id == "216620080007039826152"
|
|
64
|
+
assert result.amount.value == "100000.00"
|
|
65
|
+
assert result.amount.currency == "IDR"
|
|
66
|
+
assert result.latest_transaction_status == "00"
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 PT Espay Debit Indonesia Koe
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import os
|
|
17
|
-
from dana.webhook.finish_notify_request import FinishNotifyRequest
|
|
18
|
-
from dana.webhook import WebhookParser
|
|
19
|
-
from dana.utils.snap_header import SnapHeader
|
|
20
|
-
# Import fixtures directly from their modules to avoid circular imports
|
|
21
|
-
from tests.fixtures.api_client import api_instance_payment_gateway
|
|
22
|
-
from tests.fixtures.payment_gateway import webhook_key_pair
|
|
23
|
-
|
|
24
|
-
class TestWebhookParser:
|
|
25
|
-
def test_webhook_signature_and_parsing_success(self):
|
|
26
|
-
public_key, private_key = os.getenv("WEBHOOK_PUBLIC_KEY"), os.getenv("WEBHOOK_PRIVATE_KEY")
|
|
27
|
-
parser = WebhookParser(public_key=public_key)
|
|
28
|
-
webhook_http_method = "POST"
|
|
29
|
-
webhook_relative_url = "/v1.0/debit/notify"
|
|
30
|
-
webhook_body_dict = {
|
|
31
|
-
"originalPartnerReferenceNo": "TESTPN20240101001",
|
|
32
|
-
"originalReferenceNo": "TESTREF20240101001",
|
|
33
|
-
"merchantId": "TESTMERCH001",
|
|
34
|
-
"subMerchantId": "TESTSUBMERCH001",
|
|
35
|
-
"amount": {"value": "15000.00", "currency": "IDR"},
|
|
36
|
-
"latestTransactionStatus": "00",
|
|
37
|
-
"transactionStatusDesc": "Success",
|
|
38
|
-
"createdTime": "2024-01-01T10:00:00+07:00",
|
|
39
|
-
"finishedTime": "2024-01-01T10:00:05+07:00"
|
|
40
|
-
}
|
|
41
|
-
webhook_body_str = json.dumps(webhook_body_dict, separators=(",", ":"))
|
|
42
|
-
# Generate signature headers with SnapHeader
|
|
43
|
-
generated_headers = SnapHeader.get_snap_generated_auth(
|
|
44
|
-
method=webhook_http_method,
|
|
45
|
-
resource_path=webhook_relative_url,
|
|
46
|
-
body=webhook_body_str,
|
|
47
|
-
private_key=private_key
|
|
48
|
-
)
|
|
49
|
-
headers = {
|
|
50
|
-
"X-TIMESTAMP": generated_headers["X-TIMESTAMP"]["value"],
|
|
51
|
-
"X-SIGNATURE": generated_headers["X-SIGNATURE"]["value"]
|
|
52
|
-
}
|
|
53
|
-
result = parser.parse_webhook(
|
|
54
|
-
http_method=webhook_http_method,
|
|
55
|
-
relative_path_url=webhook_relative_url,
|
|
56
|
-
headers=headers,
|
|
57
|
-
body=webhook_body_str
|
|
58
|
-
)
|
|
59
|
-
assert isinstance(result, FinishNotifyRequest)
|
|
60
|
-
assert result.to_dict() == webhook_body_dict
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_request.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/bank_account_inquiry_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/dana_account_inquiry_request.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/dana_account_inquiry_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_request.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_bank_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_request.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/disbursement/v1/models/transfer_to_dana_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/api/merchant_management_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_request.py
RENAMED
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/create_shop_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/division_resource_info.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/mobile_no_info.py
RENAMED
|
File without changes
|
|
File without changes
|
{dana_python-1.1.3 → dana_python-1.1.4}/dana/merchant_management/v1/models/query_division_request.py
RENAMED
|
File without changes
|
|
File without changes
|