magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Authorize.net isn't worked after upgrade from 2.0.4 to 2.0.7. #4777

Closed vovan1983 closed 8 years ago

vovan1983 commented 8 years ago

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/

alexcrz commented 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 ?

vovan1983 commented 8 years ago

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.

alexcrz commented 8 years ago

@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/

vovan1983 commented 8 years ago

@alexcrz looking in vendor directory: /vendor/magento/module-quote/Model/Quote/Payment.php.

alexcrz commented 8 years ago

I did that change now I get "payment capturing error"

vovan1983 commented 8 years ago

So now try to debug your function 'capture' in your custom payment model, you've got exception.

alexcrz commented 8 years ago

Sorry, how do I do that ?

vovan1983 commented 8 years ago

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".

alexcrz commented 8 years ago

but do I need Authorize.net ? can I only use stripe ?

vovan1983 commented 8 years ago

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()

alexcrz commented 8 years ago

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"

vovan1983 commented 8 years ago

debug function public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) for errors

alexcrz commented 8 years ago

How do I debug it ?

vovan1983 commented 8 years ago

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

alexcrz commented 8 years ago

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)

dkvashninbay commented 8 years ago

@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

alena-marchenko commented 8 years ago

Closing this issue due to no response, please reopen when you have an update