Api endpoints seem to be inactive


#1

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘www.paynow.co.zw’, port=443): Max retries exceeded with url: /interface/remotetransaction (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x7f3d6f0b8e50>: Failed to establish a new connection: [Errno 113] No route to host’))


#2

Hi Are you still facing the issue


#3

If you are still facing the challenge kindly provide more details on the problem and code snippet would be more helpful

Please make sure you are using correct url for express transaction :

https://www.paynow.co.zw/interface/remotetransaction
as stated here Express Checkout Transactions · Paynow Developer Hub

Thanks


#4

yes im using that, im actually using the sdk , python.

def initiate_ecocashpayment(account, amount, paynow_number):
paynow = Paynow(
‘yyyyyy’,
‘xxxxxxx’,
‘commisary.xxxxxx.co.zw’,
‘commisary-pay.xxxxxxx.co.zw/api/method/prisons_payment_gateway.Top_up.webhook_mobile’
)
system_payment=Payment_sys(account,paynow_number,‘ecocash’,amount)
name=system_payment.create_payment()

payment = paynow.create_payment(name, 'xxxxx@gmail.com')
payment.items = []
payment.add('Commissary Topup', amount)
try:
	response =paynow.send_mobile(payment, paynow_number, 'ecocash')
	system_payment.edit_payment(transaction_id=poll_url)
	doc = frappe.new_doc("Payments")
	poll_url = response.poll_url
	print("Poll Url: ", poll_url)
	status = paynow.check_transaction_status(poll_url)
	time.sleep(0.1)
	print("Payment Status: ", status.status)
	if status.paid:
		return debit_account(account,amount)
	else:
		pass
except Exception as e:
	frappe.throw("Transaction and Log Failed")

At one moment it works, when i try again it fails, i have live keys im not willing to share and im definitely sure they work. Its as if the service is intermittent on that side.


#5

Thank you for providing more information.
Kindly confirm that you are not calling your method in a loop. Such that your requests are getting blocked?