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

orginal_amount parameter #8

Open
pawellen opened this issue Jan 29, 2014 · 3 comments
Open

orginal_amount parameter #8

pawellen opened this issue Jan 29, 2014 · 3 comments

Comments

@pawellen
Copy link

Hi, in CallbackController You are using a orginal_amount parameter to approveAndDeposit method. Why You chose this parameter instead of amount parameter?
I interested about it becouse this parameter is not involved in md5 pin verification process so it is unsecure I guess.
The second thing is that I read documentation from DotPay and I found that this value is always total value of payment but user pay only part of total amount by dotpay. In this case dotpay will send for example amount: 1.00 but orginal_amount: 1000.00 but Your plugin will think that 1000 was paid? (Translation from polish doc about orginal_amount parameter: "Kwota transakcji (pobrana z parametru amount przesłanego w przekierowaniu)" - amount of transaction (it is taken from parameter amount while redirecting). If I am not wrong this cound be potential dangerous? What do You think about it?

@ch3ric
Copy link
Contributor

ch3ric commented Jan 29, 2014

thanks @pawellen, I think you're right..

@ClementGautier what do you think about it? Do you remember why we used 'orginal_amout' instead of 'amount'?

@pawellen
Copy link
Author

I have made some changes with amount parameter, also added support for case when dotpay send to urlc first faild status and then in next success status (dotpay support told me that this situatiion happens when user cancel transaction in bank and then hit back button couple of times to back dotpay page and then again try to pay for example in another bank). My change:

https://github.com/pawellen/ETSPaymentDotpayBundle/blob/master/Controller/CallbackController.php

Maby this will be usefull for you :) I an going to do merge request but I have to some test's, git squash and I havent finshed them yet. ...to much work.

@ch3ric
Copy link
Contributor

ch3ric commented Jan 29, 2014

Thanks a lot @pawellen
Looking forward to seeing your pull request.

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

No branches or pull requests

2 participants