telebirr icon indicating copy to clipboard operation
telebirr copied to clipboard

400 Operation failed

Open abeyshiferaw0 opened this issue 3 years ago • 2 comments

Hi, i was trying to integrate with telebirr with your package but i keep getting short code inconsistent error so i figured this package was using the production telebirr api link, so i forked your code and tried it with the test api link that we get from tele birr but still

400 Operation failed

is the only thing that i am getting .

this is the link i switched api value to http://196.188.120.3:11443/ammapi/service-openup/toTradeWebPay

any help or tips would be appreciated, what should i do,

also it would be great if you your package could accept isTestEnv value so that it can work with test environment

abeyshiferaw0 avatar Jan 25 '22 19:01 abeyshiferaw0

@abeyshiferaw0 , The Url you are using is incorrect. For mobile application you should use http://196.188.120.3:11443/ammapi/payment/service-openup/toTradeMobilePay and for Web/H5 usehttp://196.188.120.3:11443/service-openup/toTradeWebPay.

yeabashenafi avatar Feb 14 '22 08:02 yeabashenafi

You can pass api url as a constructor param on v0.0.3

telebirr = Telebirr( app_id="YOUR APP ID FROM TELEBIRR ADMIN", app_key="YOUR APP KEY FROM TELEBIRR ADMIN", public_key=private_key, notify_url="https://example.com/telebirr/121232", receive_name="Your company name", return_url="https://example.com/", short_code="SHORT CODE FROM TELEBIRR ADMIN", subject="Test", timeout_express="30", total_amount="10", nonce="UNIQUE", out_trade_no="UNIQUE", api="http://196.188.120.3:11443/service-openup/toTradeWebPay" )

Like this

eba-alemayehu avatar Mar 05 '22 10:03 eba-alemayehu