Coder Social home page Coder Social logo

midtrans / midtrans-magento2 Goto Github PK

View Code? Open in Web Editor NEW
2.0 9.0 7.0 596 KB

Official Midtrans Payment Module for Magento 2 | https://midtrans.com

License: MIT License

PHP 74.81% JavaScript 16.80% HTML 8.29% CSS 0.10%
magento2 payment-gateway magento2-module midtrans

midtrans-magento2's Issues

Notice: Trying to get property 'status_code' of non-object

Hallo, coba install modul midtrans di m2, tepatnya 2.3.2
Transaksi jalan normal, tapi tidak bisa terima balikan notifikasi pembayaran,

{"0":"Notice: Trying to get property 'status_code' of non-object in \/var\/www\/html\/lib\/internal\/midtrans-php\/Midtrans\/ApiRequestor.php on line 102","1":"<pre>#1 Midtrans\\ApiRequestor::remoteCall('https:\/\/api.sand...', 'SB-Mid-server-4P...', false, false) called at [lib\/internal\/midtrans-php\/Midtrans\/ApiRequestor.php:22]\n#2 Midtrans\\ApiRequestor::get('https:\/\/api.sand...', 'SB-Mid-server-4P...', false) called at [lib\/internal\/midtrans-php\/Midtrans\/Transaction.php:23]\n#3 Midtrans\\Transaction::status(NULL) called at [lib\/internal\/midtrans-php\/Midtrans\/Notification.php:26]\n#4 Midtrans\\Notification->__construct('php:\/\/input') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:116]\n#5 Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->createObject('Midtrans\\Notific...', array('php:\/\/input')) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:108]\n#6 Magento\\Framework\\ObjectManager\\Factory\\Compiled->create('Midtrans\\Notific...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#7 Magento\\Framework\\ObjectManager\\ObjectManager->get('Midtrans\\Notific...') called at [app\/code\/Midtrans\/Snap\/Controller\/Payment\/Notification.php:56]\n#8 Midtrans\\Snap\\Controller\\Payment\\Notification->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:108]\n#9 Magento\\Framework\\App\\Action\\Action->dispatch(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#10 Midtrans\\Snap\\Controller\\Payment\\Notification\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#)) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#11 Midtrans\\Snap\\Controller\\Payment\\Notification\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#12 Midtrans\\Snap\\Controller\\Payment\\Notification\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#), array(array('designLoader', 'customerNotifica...', 'catalog_app_acti...', 'tax-app-action-d...', 'weee-app-action-...', 'storeCheck', 'contextPlugin', 'customer-app-act...'))) called at [generated\/code\/Midtrans\/Snap\/Controller\/Payment\/Notification\/Interceptor.php:26]\n#13 Midtrans\\Snap\\Controller\\Payment\\Notification\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/App\/FrontController.php:159]\n#14 Magento\\Framework\\App\\FrontController->processRequest(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#, &Midtrans\\Snap\\Controller\\Payment\\Notification\\Interceptor#000000000e895535000000005911c361#) called at [vendor\/magento\/framework\/App\/FrontController.php:99]\n#15 Magento\\Framework\\App\\FrontController->dispatch(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#16 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#)) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#17 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:94]\n#18 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch(&Magento\\Framework\\App\\FrontController\\Interceptor#000000000e895796000000005911c361#, &Closure#000000000e895672000000005911c361#, &Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#19 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:69]\n#20 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch(&Magento\\Framework\\App\\FrontController\\Interceptor#000000000e895796000000005911c361#, &Closure#000000000e895672000000005911c361#, &Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#21 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#22 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#), NULL) called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:26]\n#23 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#000000000e8954c5000000005911c361#) called at [vendor\/magento\/framework\/App\/Http.php:137]\n#24 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:261]\n#25 Magento\\Framework\\App\\Bootstrap->run(&Magento\\Framework\\App\\Http\\Interceptor#000000000e89543b000000005911c361#) called at [index.php:39]\n<\/pre>","url":"\/snap\/payment\/notification","script_name":"\/index.php"}

coba hit ulang via postman juga sama,,
bisa tolong dibantu, trims,,

Checkout total double amount

I am using this extension on Magento 2.4 and it is working perfectly for simple products, but on configurable products, it shows the double price as of actual cart total.

Bad Request

per tanggal 15 Oktober 2020, untuk versi yang terbaru, saya mendapatkan response "Bad Request" ketika request token SNAP API, namun tidak terjadi pada versi 2.2.0.

`[2020-10-15 06:30:15] MidtransLogger.ERROR: Midtrans Error (400):

400 Bad request


Your browser sent an invalid request.

| Request url: https://app.midtrans.com/snap/v1/transactions {"is_exception":false} [] `

Saya lihat perbedaannya ada pada header yang dikirim, jadi saya coba samakan dengan versi di 2.2.0.

$curl_options = array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Accept: application/json', 'user-agent : Magento 2 Module', 'x-plugin-name : midtrans-magento2', 'Authorization: Basic ' . base64_encode($server_key . ':') ), CURLOPT_RETURNTRANSFER => 1, // CURLOPT_CAINFO => dirname(__FILE__) . "/../data/cacert.pem" );

menjadi

$curl_options = array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Accept: application/json', 'Authorization: Basic ' . base64_encode($server_key . ':') ), CURLOPT_RETURNTRANSFER => 1, // CURLOPT_CAINFO => dirname(__FILE__) . "/../data/cacert.pem" );

pada file SnapApiRequestor.php dan ApiRequestor.php

Saleable Quantity won't restore on Expired Status

I'm having trouble with my saleable quantity not being restored after a payment expires. However, if the order is canceled from the admin panel, the saleable quantity is restored. This issue only occurs with expired payments, and I'm using GoPay for testing.

Can not place an order

Preconditions and environment

  • Magento 2.4.4 or 2.4.3 and Midtrans 2.7.0
  • Enable Snap Redirect

Steps to reproduce

  • Open web, add a product to Cart
  • Go to checkout, payment page
  • Click to Place Order

Expected result

  • Go to payment page

Actual result

  • Can not go to payment page

Other

Midtrans error log: The entity that was requested doesn't exist. Verify the entity and try again

Hint maybe:

  • getOrderByIncrementId in Midtrans/Snap/Model/Order/OrderRepository.php.

  • $this->magentoOrderRepository->get($realOrderId). Function get is default Magento with parameter is entity_id of order but in class Midtrans/Snap/Controller/Payment/Redirect.php (Line 16) call it with parameter is increment id.

Support Multishipping

Halo, saya ingin mengkonfirmasi, apakah plugin Midtrans untuk Magento ini sudah support untuk Multishipping?

Karna saya coba tidak muncul di multishipping untuk payment Midtrans.

@Xaxxis
Terima kasih.

Payment captured but invoice not generated

Preconditions and environment

  • Magento 2.4.3 and Midtrans 2.6.5

Steps to reproduce

  • Open web, add a product to Cart
  • Go to checkout, payment page
  • Input incorrect data: 4411 1111 1111 1118 , 10/25, CVV: 111
  • Input correct data again: 4411 1111 1111 1118 , 10/25, CVV: 123

Expected result

  • Order status change to processing and invoice generated.

Actual result

  • Order status is processing and invoice is not generated.

Hint maybe:
When Input data is incorrect, order received Deny notification from midtrands, and order status change to Payment Review. After customer input correct data again, order received Capture notification from midtrands. However, the invoice is not generated because the order did not pass canInvoice function because the current status is Payment Review.

Tag new version

Current 2.3.0 is require:
"php": "~5.5.0|~5.6.0",

but magento 2.3.x require php 7.
Please tag new version for current code in master
cc: @Xaxxis

Expired not working

Halo, saya coba set expired di config, namun di payload tidak terkirim. Saya lihat di AbstractAction seperti ini:

` if (!empty($customExpiry)) {
$customExpiry = explode(" ", $customExpiry);
$expiry_unit = $customExpiry[1];
$expiry_duration = (int)$customExpiry[0];

        $payloads['expiry'] = [
            'unit' => $expiry_unit,
            'duration' => (int)$expiry_duration
        ];
    }`

$customExpiry tidak merujuk ke variable apa pun, apakah mungkin maksudnya merujuk ke config?

Custom Snap

Halo.. saya ingin menanyakan fitur. apakah bisa dengan snap ini menambahkan biaya layanan dengan perhitungan sesuai credit card yang digunakan dan installment term yg dipilih oleh customer? jika bisa bagaimana caranya. jika tidak bisa workaround nya seperti apa ya.

Save Credit Card

Selamat Sore, mau tanya. kalo save credit card number di plugin midtrans untuk magento sudah bisa dipakai kah?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.