kevupton / laravel-coinpayments

35 stars 33 forks source link

Base table not found 'ProjectName.cp_cp_cp_transactions' #28

Closed iamprobirdey closed 3 years ago

iamprobirdey commented 5 years ago

I am trying to send the request as i went through the complete process.Since i there is no such type of table called cp_cp_cp_transactions as it should be this cp_transactions

"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ProjectName.cp_cp_cp_transactions' doesn't exist (SQL: insert into `cp_cp_cp_transactions` (`currency1`, `currency2`, `buyer_email`, `buyer_name`, `item_number`, `custom`, `ipn_url`, `txn_id`, `address`, `confirms_needed`, `timeout`, `status_url`, `qrcode_url`, `amount1`, `amount2`, `updated_at`, `created_at`) values (USD, BTC, deyprobir73@gmail.com, Samrat, 1, ola, http://ProjectName/coin-payment/response, CPDB326QGLMTFOREY9QAMNPMXT, 377xFD6H2HX1ABhaAn2gaDkBdrSiSUAGv1, 2, 21600, https://www.coinpayments.net/index.phphttps://www.coinpayments.net/qrgen.php5id=CPDB326QGLMTFOREY9QAMNPMXT&key=a15f4ce8cef1da6a6a62d5e051bae49acmd=status&id=CPDB326QGLMTFOREY9QAMNPMXT&key=a15f4ce8cef1da6a6a62d5e051bae49a, 0.00138777, 2019-02-13 07:04:20, 2019-02-13 07:04:20, ?, ?))

iamprobirdey commented 5 years ago

By default, while migrating all the coin_payment table, transaction table name was cp_transaction but while receiving the response, it was searching for cp_cp_cp_transaction table which doesn't exist. So, I manually changed cp_transaction to cp_cp_cp_transaction and it started working.

But is it the right way?

nagsamayam commented 5 years ago

I am also facing same issue

insert into cp_cp_transactions (currency1, currency2, buyer_email, buyer_name, item_number, custom, ipn_url, txn_id, address, confirms_needed, timeout, status_url, qrcode_url, amount1, amount2, updated_at, created_at) values (USD, BTC, root@gmail.com, Admin Test, 1, 1,1,1,1,10, , CPDF3MSTXUZGEBMRSXXBUQV7BT, 3H2xEt7FVVtQaAZK1F7AM1iaTzJCSqYTt9, 2, 99000, https://www.coinpayments.net/index.php?cmd=status&id=CPDF3MSTXUZGEBMRSJXBUQV&key=c1c480ceb7df9b57fd2d247b5e741c28, https://www.coinpayments.net/qrgen.php?id=CPDF3MSTXUZGEBMRSJQV7BT&key=c1c480ceb7df9b57fd2d247b5e741c28, 10, 0.00089894, 2019-06-22 14:01:44, 2019-06-22 14:01:44)

nagsamayam commented 5 years ago

Thank you @mykytak for raising PR. @probir17 you can have temporary fix(till they merge into repo) from https://github.com/kevupton/laravel-coinpayments/pull/29/files

kevupton commented 3 years ago

closing as pr has been merged, so should be fixed.

LeonBuchner commented 3 years ago

No, the error still exists...

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project.cp_cp_transactions' doesn't exist (SQL: insert into cp_cp_transactions (currency1, currency2, buyer_email, buyer_name, item_name, invoice, ipn_url, txn_id, address, confirms_needed, timeout, status_url, qrcode_url, amount1, amount2, updated_at, created_at)

It will only work if you set the db prefix in your .env file to null. But then your database tables will not have any prefix.

COINPAYMENTS_DB_PREFIX=null