Closed parekhreena closed 5 years ago
Hi @parekhreena ,
Thanks for your question. The 404 means that the payment was not found, I assume $additionalInformation['transaction_info']['source']['id']
is not a valid pay_id (in your first example). The second example I couldn't understand very much, but the third one looks ok to me. Just make sure $invoice->getGrandTotal();
returns a integer value.
Just to clarify, you cannot capture a payment twice. If you want to partially capture a payment, remember to set $payment->capture = false;
and manually capture with a new amount (equals or lower than the requested).
Hi @aquila-freitas-cko
Thank you for prompt response. for the third one I am sending intenger amount 100 and getting the reponse endpoint did not accept the request.
Also, if $additionalInformation['transaction_info']['source']['id'] is not the payment ID then please let me know where is it stored by checkout.com extension ? I also tried with $additionalInformation['transaction_info']['id'] and get the same error. I am using this module: https://github.com/checkout/checkout-magento-plugin
Regarding the third example, I am struggling to replicate the issue. I assume it's on the gateway side.
On the last line, pass the HttpHandler::MODE_RETRIEVE
as second parameter (like: $response = $checkout->payments()->request($payment, HttpHandler::MODE_RETRIEVE);
). Then after that, do $response->serialize()
show me the return of it. !Obs.! This will expose your secret key.
@avish-bisbeehurry-cko will help you with the magento1 soon.
@aquila-freitas-cko It's fine, I found the solution. Thank you for taking out the time to look into it with me. I am closing this ticket.
Following the example here: https://github.com/checkout/checkout-sdk-php/wiki/2.-Payments
I tried below code but it fails with Response Code 404 The endpoint did not accept your request:
I also tried below which says invalid Request endpoint did not accept:
Also tried below method which gives same error Endpoint did not accept request Error Code 400: