BitPay
BitPay is a bitcoin payment service provider headquartered in Atlanta, Georgia, United States. It was founded in May 2011 by Tony Gallippi and Stephen Pair. BitPay provides Bitcoin and Bitcoin Cash payment processing services for merchants.
Before integrate BitPay check the list that your country is not restricted. Restricted Country List
BitPay integrate inside Pixer.
Please follow & complete this steps for BitPay integration for your e-commerce system.
- Inside
.env
file copy & paste this line of codes. We will discuss later about how to create those API keys in BitPay.
# `BITPAY_IS_PRODUCTION` value either true or falseBITPAY_IS_PRODUCTION=false# Set any password you want that will use for encrypting your private keyBITPAY_KEY_STORAGE_PASSWORD=[LONG_SECRET]# This is used for generating your token.BITPAY_ENABLE_MERCHANT=trueBITPAY_ENABLE_PAYOUT=false# This is important generating your json or yml fileBITPAY_GENERATE_JSON_FILE=trueBITPAY_GENERATE_YML_FILE=false# All Files are located `storage/app/private/`. Which will use for initiating you BITPAY client.SHOP_URL=[YOUR_SHOP_URL]
- Activate BitPay from Pixer admin dashboard. (e.g. webhook URL is coming from local development. This static link will dynamically generated in live environment)
How to create & setup BitPay information properly?
Create an account in https://bitpay.com/authenticate/signup?business
Choose sandbox if your are testing your development environment signup in here https://test.bitpay.com/authenticate/signup.
Now go to the terminal run
php artisan marvel:generate_bitpay_config
to generate your private key and config fileYou will find an output like below, With some instructions.
- You can approve the API Token by logon to that url, or just copy The ParingCode and goto your bitpay merchant account's dashboard. Go to Payment Tools find API TOKEN section paste Paring Code there. Then find and approve it.
Webhook is most import thing to manage payments status with bitpay setup.
Available Webhooks Status.
- new
- paid
- confirmed
- complete
- expired
- invalid
At last, For going live with your application please follow this official documentation. https://github.com/bitpay/php-bitpay-client-v2 and https://test.bitpay.com/api/