We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added test test_secret_key on the authorization header and pointed API is https://a.khalti.com/api/v2/epayment/initiate
https://a.khalti.com/api/v2/epayment/initiate
interface
export interface Ikhalti { return_url: string; website_url: string; amount: number; purchase_order_id: string; purchase_order_name: string; customer_info: { name: string; email: string; phone: string; }, amount_breakdown: { label: string; amount: number; }[]; product_details: { identity: string; name: string; total_price: number; quantity: number; unit_price: number; }[]; }
used dummy from repayment docs body
return_url: 'http://localhost:8100/tabs/home', website_url: 'http://localhost:8100/tabs/home', amount: 1300, purchase_order_id: 'test12', purchase_order_name: 'test', customer_info: { name: 'Ashim Upadhaya', email: '[email protected]', phone: '9811496763' }, amount_breakdown: [ { label: 'Mark Price', amount: 1000 }, { label: 'VAT', amount: 300 } ], product_details: [ { identity: '1234567890', name: 'Khalti logo', total_price: 1300, quantity: 1, unit_price: 1300 } ] };
method
payment(): Observable<any> { const headers = new HttpHeaders(); headers.set('Authorization', '<test_secret_key>'); headers.set('content-type', 'application/json'); headers.set('Access-Control-Allow-Origin', '*'); return this.httpClient.post('https://a.khalti.com/api/v2/epayment/initiate', {body: this.body }, {'headers':headers}); }
The text was updated successfully, but these errors were encountered:
Hello @Prabin1111 , did you fix it? Can you plz share it
Sorry, something went wrong.
@Roopaish i have not found any solution. And i am also not activity involved in khalti integration so have not got chances to look at it.
So you have to make your own api and hit the khalti server from the backend.
I created a khalti api on the server using Node.js and deployed it on render. It works but when I hit this api from the frontend, the response is:
Sometimes it works and sometime it gives error ?
No branches or pull requests
added test test_secret_key on the authorization header and pointed API is
https://a.khalti.com/api/v2/epayment/initiate
interface
used dummy from repayment docs body
method
The text was updated successfully, but these errors were encountered: