cla-bit / PayStackEase

This is a Paystack API wrapper using Asynchronous and Synchronous request to interact with Paystack endpoints for various financial services.
https://pypi.org/project/paystackease/
MIT License
1 stars 0 forks source link

How can i retrieve the checkout url after initiating a transaction? #5

Closed cla-bit closed 7 months ago

cla-bit commented 7 months ago

I want to retrieve the checkout url after creating a transaction, and pass a status code 301.

cla-bit commented 7 months ago

I want to retrieve the checkout url after creating a transaction, and pass a status code 301.

You can retrieve the url by getting the ["data"]["authorization_url"]. This way you can redirect and pass a 301 in your application. Or simply use webbrowser to open the url.

cla-bit commented 7 months ago

When a request is made to the server, a PayStackResponse object is returned and with the URL property method, you can retrieve the checkout URL.

The use of ["data"]["authorization_url"] has been deprecated.