Skip to content
New issue

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

Fixed currency conversion before capture payment #10

Merged
merged 1 commit into from
Oct 4, 2017

Conversation

sambhav-aggarwal
Copy link
Contributor

The getCurrency() method was returning the base currency of the system and not the user due to which the invoice amount was getting converted again if the base currency and invoice currency are different.

@albingeorge
Copy link
Contributor

We are not handling the currency conversion in payment correctly and the payment works only if the currency is INR. We will take this up once we handle currency conversion.

@nuclearsam Were you able to test this?

@sambhav-aggarwal
Copy link
Contributor Author

@albingeorge Yes, I have tested the pull request #10. I am using this on my production server with base currency as USD and it is working fine.

@albingeorge
Copy link
Contributor

@nuclearsam The problem is that this does not work for those merchants for whom we have not enabled USD.

Also, the payment is made in USD and the capture in INR. In the capture process, since the conversion is using the WHMCS's converter, it has the option to change the conversion value, and if that happens, the capture(and the payment) fails.

The way to solve this problem would be for us to implement our Orders API here and enable auto_capture.

@albingeorge
Copy link
Contributor

I had misunderstood the issue here initially. Even if the customer was paying in INR, if the base currency was different(say USD), it was failing to capture the payment and the payment would be refunded to the customer if not captured manually by the merchant from his dashboard.

Reviewed and tested this locally.

@albingeorge albingeorge merged commit 9f09905 into razorpay:master Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants