Skip to content

Commit

Permalink
feat: compatibility with btcpay and access tokens
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Bensaïbi <[email protected]>
  • Loading branch information
olinkl authored and Adrien Bensaïbi committed May 10, 2018
1 parent 5e5799c commit e3d5b5b
Show file tree
Hide file tree
Showing 50 changed files with 1,316 additions and 872 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
/vendor/
composer.lock
composer.phar
/modules/btcpay/lib/*
39 changes: 18 additions & 21 deletions GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# Using the BitPay plugin for Prestashop

## Last Cart Versions Tested: 1.6.1.14 and 1.7.2.4
# Using the BTCPay plugin for Prestashop

## Prerequisites
You must have a BitPay merchant account to use this plugin. It's free to [sign-up for a BitPay merchant account](https://bitpay.com/start).
If you want to test in test mode, please see the following page for more information: https://bitpay.com/docs/testing
You must have a BTCPay merchant account to use this plugin.
If you want to test in test mode, just paste an other btcpayserver url with testing port.

## Making a release
* add Bitpay https://github.com/btcpayserver/php-bitpay-client/tree/master/src/Bitpay into modules/bitpay/lib
* zip btcpay directory into btcpay.zip
* add bitcoin icon into Order state configuration / icon !


## Server Requirements

+ PrestaShop 1.5, 1.6 or 1.7
+ PrestaShop 1.7
+ PHP 5+
+ Curl PHP Extension
+ JSON PHP Extension

## Plugin Configuration

### For Prestashop versions 1.5:
1. Upload files to your PrestaShop installation.<br />
2. Go to your PrestaShop administration. Modules -> Payments & Gateways -> "BitPay" click [Install]<br />
3. Go to your PrestaShop administration. Modules -> Payments & Gateways -> "BitPay" click [Configure]<br />
4. Create an API Key in your bitpay account at bitpay.com.<br />
5. Enter your API Key from step 4.
6. Choose "Low" or "Medium" Speed. The High Speed setting is broken.

### For Prestashop versions 1.6 and 1.7:
1. Download the latest release from https://github.com/bitpay/prestashop-plugin/releases
2. Go to your PrestaShop administration. Under "Modules and services" select "Add new module" (v1.6) or "Upload a module" (v1.7)
3. Go to your "installed modules" -> "BitPay" and click [Configure]<br />
4. Create a legacy API Key in your bitpay account at bitpay.com: https://www.bitpay.com/dashboard/merchant/api-keys<br />
5. Enter your API Key from step 4.
6. Choose "Low" or "Medium" Speed. The High Speed setting is broken.
### For Prestashop versions 1.7:
1. Download the latest release from https://github.com/adapp-tech/prestashop-plugin/releases
2. Go to your PrestaShop administration. Under "Modules and services" select "Upload a module" (v1.7)
3. Go to your "installed modules" -> "BTCPay" and click [Configure]<br />
4. Go on your BTCPay server, in your store and display access tokens.
5. Click on "Create a new token API", select your store and then approve
6. You will see: "Server initiated pairing code: XXXX". Go back to prestashop and enter your pairing code.
7. Validate.
8. Test a payment.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2011-2015 BitPay
Copyright (c) 2018-2018 ADAPP
Copyright (c) 2011-2018 Bitpay

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
51 changes: 32 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
# Notice
# Prestashop Plugin for BTCPay server, an opensource Payment processor

This is a Community-supported project.
Warning this is an Beta version
Use it at your own risk

If you are interested in becoming a maintainer of this project, please contact us at [email protected]. Developers at BitPay will attempt to work along the new maintainers to ensure the project remains viable for the foreseeable future.
## Description

# Description
A bitcoin payment plugin for PrestaShop using BTCPay server.
BTCPay Server is a free and open source server for merchants wanting to accept Bitcoin for their business.
The API is compatible with Bitpay service to allow seamless migration.

Bitcoin payment plugin for PrestaShop using the bitpay.com service.
BTCPay is design to be easy to deploy on container hosting platform like Azure.
and if you want, some companies provide hosting services.

[![Build Status](https://travis-ci.org/bitpay/prestashop-plugin.svg?branch=master)](https://travis-ci.org/bitpay/prestashop-plugin)
## Quick Start Guide

To get up and running with our plugin quickly, see the GUIDE here: https://github.com/adapp-tech/prestashop-plugin/blob/master/GUIDE.md


# Internals

This plugin only generate Prestashop order and invoice (aka postponed order), when payment is received.
Prestashop design ensure customer is ready to pay, with a checkbox, when he is forwarded to payment processor.

## Quick Start Guide

To get up and running with our plugin quickly, see the GUIDE here: https://github.com/bitpay/prestashop-plugin/blob/master/GUIDE.md
# TODO
Their is still a lot's of place for improvement.
* composer with php-bitpay-client
* on/off postponed order
* direct configuration for block confirmations
* docker for testing
* travis integration
* check 1.6.X compatibility


# Support

## BitPay Support
## Tested successfully
* Prestashop 1.7.x
* BTCPay server v1.0.1 and v1.0.2

* Last Cart Version Tested: 1.7.2.4 and 1.6.1.14
* [GitHub Issues](https://github.com/bitpay/prestashop-plugin/issues)
* Open an issue if you are having issues with this plugin.
* [Support](https://help.bitpay.com)
* BitPay merchant support documentation
## Contribute

To contribute to this project, please fork and submit a pull request.
* [GitHub Issues](https://github.com/adapptech/prestashop-plugin/issues)

## PrestaShop Support

Expand All @@ -34,15 +51,11 @@ To get up and running with our plugin quickly, see the GUIDE here: https://githu
* [Support Forums](http://www.prestashop.com/forums/)


# Contribute

To contribute to this project, please fork and submit a pull request.


# License

The MIT License (MIT)

Copyright (c) 2018-2018 ADAPP
Copyright (c) 2011-2018 BitPay

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
-->
<project name="bitpay/build-script" default="build">
<project name="btcpay/build-script" default="build">
<!--
Default properties
-->
Expand Down
27 changes: 17 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{
"name": "bitpay/prestashop",
"description": "BitPay payment plugin for PrestaShop",
"name": "btcpay/prestashop",
"description": "BTCPay payment plugin for PrestaShop",
"type": "whmcs-plugin",
"keywords": ["prestashop","plugin","payment","ecommerce","bitcoin","bitpay"],
"homepage": "https://github.com/bitpay/prestashop-plugin",
"keywords": ["prestashop","plugin","payment","ecommerce","bitcoin","btcpay"],
"homepage": "https://github.com/adapp-tech/prestashop-plugin",
"license": "MIT",
"support": {
"email": "[email protected]",
"issues": "https://github.com/bitpay/prestashop-plugin/issues",
"source": "https://github.com/bitpay/prestashop-plugin"
"email": "[email protected]",
"issues": "https://github.com/adapp-tech/prestashop-plugin/issues",
"source": "https://github.com/adapp-tech/prestashop-plugin"
},
"minimum-stability": "stable",
"authors": [
{
"name": "BitPay Integrations Development Team",
"email": "[email protected]",
"homepage": "https://bitpay.com/integrations"
"name": "Adrien",
"email": "[email protected]",
"homepage": "https://testpay.adapp.tech/integrations"
}
],
"repositories": [
{
"type": "git",
"url": "https://github.com/adapp-tech/prestashop-plugin.git"
}
],
"require": {
"bitpay/php-client": "4.0.2",
"php": ">=5.3",
"ext-curl": "*",
"ext-json": "*",
Expand Down
Binary file removed modules/bitpay/bitcoin-accepted-here.png
Binary file not shown.
Binary file removed modules/bitpay/bitcoin.png
Binary file not shown.
Loading

0 comments on commit e3d5b5b

Please sign in to comment.