Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

IPN handler responds with HTTP 503 #23

Open
pieterpoorthuis opened this issue Oct 3, 2017 · 1 comment
Open

IPN handler responds with HTTP 503 #23

pieterpoorthuis opened this issue Oct 3, 2017 · 1 comment

Comments

@pieterpoorthuis
Copy link

pieterpoorthuis commented Oct 3, 2017

bitpay_payment.log shows nothing suspicious, but IPN script returns HTTP 503 (instead of HTTP 200):
[2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Controller\Ipn::indexAction(), Incoming IPN message from BitPay: "{\"id\":\"asdfhjklasdfhjklas\",\"url\":\"https:\/\/test.bitpay.com\/invoice?id=asdfhjklasdfhjklas\",\"posData\":\"{\\\"orderId\\\":\\\"000000049\\\"}\",\"status\":\"paid\",\"btcPrice\":\"0.000253\",\"price\":1,\"currency\":\"USD\",\"invoiceTime\":1506431424351,\"expirationTime\":1506432324351,\"currentTime\":1506431453053,\"btcPaid\":\"0.000253\",\"btcDue\":\"0.000000\",\"rate\":3959.3,\"exceptionStatus\":false,\"buyerFields\":{\"buyerName\":\"\",\"buyerAddress1\":\"\",\"buyerAddress2\":\"\",\"buyerCity\":\"d\",\"buyerState\":\"AL\",\"buyerZip\":\"1234\",\"buyerCountry\":\"US\",\"buyerEmail\":\"[email protected]\",\"buyerPhone\":\"1234\",\"buyerNotify\":null}}" [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: {"id":"asdfhjklasdfhjklas","url":"https:\/\/test.bitpay.com\/invoice?id=asdfhjklasdfhjklas","posData":{"orderId":"000000049"},"status":"paid","btcPrice":"0.000253","price":1,"currency":"USD","invoiceTime":1506431424351,"expirationTime":1506432324351,"currentTime":1506431453053,"btcPaid":"0.000253","btcDue":"0.000000","rate":3959.3,"exceptionStatus":false,"buyerFields":{"buyerName":"","buyerAddress1":"","buyerAddress2":"","buyerCity":"d","buyerState":"AL","buyerZip":"1234","buyerCountry":"US","buyerEmail":"[email protected]","buyerPhone":"1234","buyerNotify":null}} [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Model\Method\Bitcoin::fetchInvoice(): function called with id Am3QEsA5Nskejy21c7c5ck [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getBitpayClient(): successfully created new BitPay Client object. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getPublicKey(): did not find an existing public key, attempting to load one from the key manager. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getKeyManager(): successfully created new BitPay KeyManager object. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] Call to MagentoStorage::load($id) with the id of payment/bitpay/public_key successfully decrypted & unserialized the entity 0:2:...[] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getPublicKey(): successfully loaded public key from the key manager, returning that. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getPrivateKey(): did not find an existing private key, attempting to load one from the key manager. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] Call to MagentoStorage::load($id) with the id of payment/bitpay/private_key successfully decrypted & unserialized the entity 0:2:.... [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getPrivateKey(): successfully loaded private key from the key manager, returning that. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Helper\Data::getToken(): successfully created new BitPay Token object. [] [] [2017-09-26 13:11:58] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Model\Method\Bitcoin::fetchInvoice(): obtained BitPay client successfully. [] [] [2017-09-26 13:11:59] Bitpay.DEBUG: [INFO] In \Bitpay\Core\Model\Method\Bitcoin::fetchInvoice(): successfully retrieved invoice id asdfhjklasdfhjklas from BitPay. [] [] [2017-09-26 13:11:59] Bitpay.DEBUG: am herepaid [] []

@MarcinKozak
Copy link
Contributor

@pieterpoorthuis This may be occurred due fact the Magento need a lot server resources. At the same time not all errors can be reported in the payment log file. To find cause of error there is need to check another 3 different places.

  • <magento_root>/var/log/exception.log
  • <magento_root>/var/report/
  • Apache error.log

By developing fixes for the module I did not received this error. Maybe reason is that I have made several fixes which fixes that issue in "background".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants