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

Support Me About Setting RequestType To CaptureWallet #7

Open
quandangminh2107 opened this issue Dec 4, 2023 · 11 comments
Open

Support Me About Setting RequestType To CaptureWallet #7

quandangminh2107 opened this issue Dec 4, 2023 · 11 comments

Comments

@quandangminh2107
Copy link

Please help me know about where location or which files in this project you set parameter "requestType" to "captureWallet".
Thanks in advance.

@mrkhoa99
Copy link
Member

mrkhoa99 commented Dec 6, 2023

@quandangminh2107 can you try to search through the module with keywords: requestType and capture?

@quandangminh2107
Copy link
Author

@mrkhoa99 I found it at "Gateway/Request/AbstractDataBuilder.php" as below:
image
I don't know if the variable PAY_URL_TYPE affects the variable REQUEST_TYPE or not. And if I want to change requestType to another value (For example: set requestType = "payWithATM" to pay using MoMo's domestic payment gateway that supports it, where do I have to adjust? Please help me know.
Thank you very much.

@thaopw
Copy link
Member

thaopw commented Dec 6, 2023

@quandangminh2107 We have updated a new version to support 3 payment methods: payWithATM, payWithCC and Wallet. Please pull and use latest tag.

@quandangminh2107
Copy link
Author

@thaopw Thank you for the new version. I have pulled the new version and tested it. But when I choose MoMo Wallet to make a payment, it shows me exception as follows:
"(Magento\Payment\Gateway\Command\CommandException(code: 0): Something went wrong when get pay url. at MomoWallet/Gateway/Command/GetPayUrlCommand.php:93)"
I have checked the response and it still returns the payURL as follows:
1
Another issue is that when I click the Pay URL from the response above, it still shows me the Payment Page.
2
But when I click "Return" button, it shows me like this:
3
Please support me to fix these issues.
Thank in advance

@thaopw
Copy link
Member

thaopw commented Dec 7, 2023

I think something went wrong when getting pay url, please ensure your request is correct.

@quandangminh2107
Copy link
Author

I have checked the payment response and it still returns the payUrl as follows:
1
So I'm sure that my request is correct.

@quandangminh2107
Copy link
Author

@thaopw Please help me to fix this issue.
Thank in advance.

1 similar comment
@quandangminh2107
Copy link
Author

@thaopw Please help me to fix this issue.
Thank in advance.

@quandangminh2107
Copy link
Author

@thaopw I try to log the error and it shows me the function validateSignature() returns false so could you help me to fix this, please?
Thank you in advance.
image
image

@quandangminh2107
Copy link
Author

@thaopw I checked the function validateSignature() in AbstractResponseValidator class and I saw that it compares the signature return from the response with the signature return from the authorization but when I rechecked the response, it doesn't have the signature value in the response. Help me, please.
image
image

@mrkhoa99
Copy link
Member

@quandangminh2107 thank you for details. I think the structure of Momo's response has been changed. In this case, you need to change the GetPayUrlValidator. From the di xml, you need to change the validator class.

image

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

3 participants