summaryrefslogtreecommitdiff
path: root/README.md
blob: c5760458c6b831aa887c531aa87b267668ac532a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Taler Gateway For Payage

## Introduction

Welcome to the user documentation for the Payage Gateway that
integrates Taler as a payment option for your website. This
documentation will guide you through the installation, configuration,
and usage of the plugin.  It is important to note that this is not a
stand-alone plugin and requires the Payage component to be installed
and configured on your website. For more information on Payage, please
visit the [Payage
Documentation](https://www.lesarbresdesign.info/extensions/payage)

## Table of Contents

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Enabling Taler Payment](#enabling-taler-payment)
    - [Managing Taler Settings](#managing-taler-settings)
- [Troubleshooting](#troubleshooting)
- [Frequently Asked Questions](#frequently-asked-questions)

## Installation

First make sure you have already a version of the Payage Plugin
installed. If not, please follow the [Payage Installation
Guide](https://www.lesarbresdesign.info/extensions/payage/installation).
If you have already installed Payage, you can install the Taler plugin
simply by downloading the latest version from the [Taler Plugin
Releases](https://ftp.gnu.org/gnu/taler/com_payage_taler-latest.zip)
and installing it through the Joomla plugin manager.

### Enabling Taler Payment

To create a new instance for a Taler Gateway, navigate to the Payage
component and select the "Gateway Accounts" tab. Click on the "New"
button to create a new gateway instance. Select "Taler" as the gateway
type and fill out the required fields.  If you have filled out all the
required fields you must TEST if the Taler Backend you configured is
valid with the "TEST" button. If the test is successful you can "Save"
the gateway. 

After all this, please make sure to PUBLISH the new payment gateway, as otherwise each of your Mediashop
products will show the next error:  "No payment gateway accounts available", and not only that. You
won't be able to see any related information about the product itself, such as description text or image.  

After publishing the payment gateway, you will see the payment button. 

To see how to create a payment button inside your E-commerce app, refer to the Payage Documentation.

## Special Currencies

The Taler Payage plugin supports all common currencies.  However, if
you want to use a special currencies that do not have a 3 letter
ISO-4217 currency code, you have to add an explicit mapping to a 3
letter currency code: Payage is limited to 3 letter currency codes
while Taler supports currency codes with up to 11 letters.

To do so, clone the Git repository from [Taler Plugin
Releases](https://gitlab.ti.bfh.ch/leibt2/taler-joomla) and edit the
file "com_payage_taler/currencies.csv".  There is already an example
for the Taler test currency "KUDOS". To add a new special currency,
simply add a new line following the same format of
"$NAME,$ABBREVIATION".  Then submit a patch to the maintainers (see
AUTHORS) to ensure that the new currency is available in future
releases.  The abbreviation should be some 3 letter code that is *not*
in ISO-4217. Note that in theory new currency codes could be added to
ISO-4217, so such unofficial currency codes may need to be removed in
the future.

## Webhook Configuration For Refunds

To update the Payage database automatically when a refund is made, you
have to configure a webhook in the Taler merchant backend.  To do so,
log into the Taler merchant backend Web interface and select the
"Webhooks" tab. Click on the "New" button to create a new webhook with
the following values:

  Id: A unique name for the webhook (say "taler-payage-refund-hook")
  Event: refund
  Method: 'POST'
  URL: "https://example.com/index.php?option=com_payage&task=refund"
  Header: 'Content-Type: application/json'
  Body: '{"refunded_amount":"{{refund_amount}}","order_id":"{{order_id}}"}'

https://tim-leibacher.ch:8443/index.php?option=com_payage&task=refund&aid=1003&tid=0

- Id: `A unique name for the webhook (say "taler-payage-refund-hook")`
- Event: `'refund'`
- Method: `'POST'`
- URL: `"https://example.com/index.php?option=com_payage&task=refund&aid=1000&tid=0"`

aid stands for the account id. In the "Gateway Accounts" tab you can see which id you should use

- Header: `'Content-Type: application/json'`
- Body:
  `'{
        "order_id": "{{order_id}}"
    }'`


## Frequently Asked Questions
Q: How can I add my own Translations? \
A: See [Taler  Translations](https://docs.taler.net/taler-developer-manual.html#how-to-create-a-translation)

Q: Where do I get my own Taler Merchant Backend? \
A: See [Taler Merchant Backend](https://docs.taler.net/taler-merchant-manual.html)