Closed vovan1983 closed 8 years ago
Hello @vovan1983 , I'm using magento 2.0.6 with this module , and as you I'm getting the "Please enter a valid credit card expiration date." error, have you managed to get it solved ?
Hi @alexcrz. Yes, it was the bug in magento 2 and here is solutin https://github.com/magento/magento2/issues/4741. They have commited fix in dev repository.
@vovan1983 the thing is I have no such a file in that directory app/code/Magento/Quote/Model/Quote/Payment.php
, there is no Magento directory into app/code/
@alexcrz looking in vendor directory: /vendor/magento/module-quote/Model/Quote/Payment.php.
I did that change now I get "payment capturing error"
So now try to debug your function 'capture' in your custom payment model, you've got exception.
Sorry, how do I do that ?
In my case, the fix in /vendor/magento/module-quote/Model/Quote/Payment.php is restored my custom inchoo_stripe module, but module "Authorize.net" still "isn't alived".
but do I need Authorize.net ? can I only use stripe ?
I redid their module (Inchoo_stripe) under another payment system. What sense. In dir Model\Payment.php :
public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) { $order = $payment->getOrder(); $billing = $order->getBillingAddress(); try { $requestData = [ 'amount' => $amount * 100, 'currency' => strtolower($order->getBaseCurrencyCode()), 'description' => sprintf('#%s, %s', $order->getIncrementId(), $order->getCustomerEmail()), 'card' => [ 'number' => $payment->getCcNumber(), 'exp_month' => sprintf('%02d',$payment->getCcExpMonth()), 'exp_year' => $payment->getCcExpYear(),
......
}`
before values: $payment->getCcNumber(),
$payment->getCcExpMonth(),
$payment->getCcExpYear()
sorry , I don't think I understood last message , what should I do now ? I did the changes as sayd in the bug fix , but I still get "payment capturing error"
debug function public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
for errors
How do I debug it ?
For example use \Psr\Log\LoggerInterface
:
http://magento.stackexchange.com/questions/92434/magento-2-replacement-for-magelog-method
If I dont forget messages in /var/log/system.log
In my /var/log/system.log I got [2016-06-03 11:36:02] main.ERROR: Payment capturing error. [] []
, and If i try to pay with inspect on page , I can see this as error : jquery.js:9666POST http://oohlalah.co.uk/rest/default/V1/guest-carts/042edad93cc184d8091c073e95bac6ec/payment-information 400 (Bad Request)
@vovan1983 Please clarify do you face an issue with Magento_Authorizenet module on 2.0.7 build? If so, please specify steps to reproduce on a clean M2 installation. Currently we do not have any issues on 2.0.7
Closing this issue due to no response, please reopen when you have an update
After upgrade Magento 2 version from 2.0.4 to 2.0.7 don't work standart Magento's payment method "Authorize.net". It not appear in checkout payment page - "No Payment method available.". In version 2.0.1 - 2.0.4 this module is worked. And my custom payment method based on inchoo_stripe began get message "Please enter a valid credit card expiration date.". I've tryied install this both modules separatly and later on 2.1RC - result the same like 2.0.7. What it can be?Thanks/