bitpay / bitpay-rails

Rails plugin for the bitpay library.
MIT License
7 stars 16 forks source link

testing transactions? #3

Closed azeemh closed 6 years ago

azeemh commented 6 years ago

maybe I missed it, but when testing, i run

client.create_invoice(price:1, currency: "USD")

and I get terminal output.

=> {"url"=>"https://test.bitpay.com/invoice?id=Ltqh6hvwJfhSfTpx1ryr6Q", "status"=>"new", "price"=>1, "currency"=>"USD", "invoiceTime"=>1535824778467, "expirationTime"=>1535825678467, "currentTime"=>1535824778484, "guid"=>"044553c7-b3cb-4d6c-906b-ad7c2b087184", "id"=>"Ltqh6hvwJfhSfTpx1ryr6Q", "lowFeeDetected"=>false, "amountPaid"=>0, "exceptionStatus"=>false, "transactions"=>[], "buyer"=>{}, "refundAddresses"=>[], "refundAddressRequestPending"=>false, "buyerProvidedInfo"=>{}, "paymentSubtotals"=>{"BTC"=>13900, "BCH"=>163700}, "paymentTotals"=>{"BTC"=>382100, "BCH"=>163900}, "exchangeRates"=>{"BTC"=>{"USD"=>7193.300000000001, "BCH"=>11.772609734542241}, "BCH"=>{"USD"=>611.01, "BTC"=>0.08515806946610527}}, "minerFees"=>{"BTC"=>{"satoshisPerByte"=>2504.556, "totalFee"=>368200}, "BCH"=>{"satoshisPerByte"=>1.019, "totalFee"=>200}}, "supportedTransactionCurrencies"=>{"BTC"=>{"enabled"=>true}, "BCH"=>{"enabled"=>true}}, "paymentCodes"=>{"BTC"=>{"BIP72b"=>"bitcoin:?r=https://test.bitpay.com/i/Ltqh6hvwJfhSfTpx1ryr6Q", "BIP73"=>"https://test.bitpay.com/i/Ltqh6hvwJfhSfTpx1ryr6Q"}, "BCH"=>{"BIP72b"=>"bitcoincash:?r=https://test.bitpay.com/i/Ltqh6hvwJfhSfTpx1ryr6Q", "BIP73"=>"https://test.bitpay.com/i/Ltqh6hvwJfhSfTpx1ryr6Q"}}, "token"=>"8HTkFUEHQkbiAErDBHqySmuevbzH2wVQVcxzvKP72hFRuXgs2XKpyvVytXmjEbHCdk"}

however when i use block.io or any other testnet supported wallet it tells me there's no valid address. and it's true: WHERE IS THE BITCOIN ADDRESSS? THIS IS BITCOIN. WHERE IS THE ADDRESS? HOW AM I SUPPOSED TO SEND A PAYMENT TO AN INVOICE WITHOUT AN ADDRESS? URLS ARE NOT BITCOIN ADDRESSES. Block.io, nor Blockchain.info, nor any other wallets seem to support this proprietary new way of accessing payment urls.

HOW DOES ONE HAVE A BITCOIN INVOICE WITHOUT A BITCOIN ADDRESS? WTF BITPAY. WHAT ARE MY USERS SUPPOSED TO COPY AND PASTE INTO THEIR BITCOIN WALLETS??? ART THOU RETARDED?

https://www.reddit.com/r/Bitcoin/comments/7muew2/bitpay_invoices_no_longer_show_an_addresswtf/dufgrq2/

pieterpoorthuis commented 6 years ago

BitPay requires BIP-70 (Payment Protocol) to pay an invoice.

You can find more information about paying a BitPay invoice here: https://bitpay.com/pay-with-bitcoin

Background info about BitPay & Payment Protocol you can find here: https://blog.bitpay.com/payment-protocol-results/

azeemh commented 6 years ago

Why is bip-70 being used? How does it make transactions for bitcoin users safer rather than simply forcing users to use a bitpay wallet?

On Mon, Sep 3, 2018, 10:43 AM Pieter Poorthuis notifications@github.com wrote:

BitPay requires BIP-70 (Payment Protocol) to pay an invoice.

You can find more information about paying a BitPay invoice here: https://bitpay.com/pay-with-bitcoin

Background info about BitPay & Payment Protocol you can find here: https://blog.bitpay.com/payment-protocol-results/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitpay/bitpay-rails/issues/3#issuecomment-418135289, or mute the thread https://github.com/notifications/unsubscribe-auth/AH1UHuGVBaOy518tp1HgTs2Lc3f7-_uYks5uXUAigaJpZM4WWV79 .