781

Product support

Get help in the plugin support forum.

Categories

Methods

Pagseguro::onAdd

Post an array $id $name $price

Pagseguro::onClear

Clear the cart

Pagseguro::onCheckout

Make url and redirect to pagseguro

Dependences

RainLab User plugin

Installation

Install from the October marketplace or:

cd plugins
mkdir indev
cd indev 
git clone https://github.com/devalexandre/oc-pagseguro.git

After cloning the repository make a file in config folder:

<?php

return [
  'pemail' => '',
  'ptoken' => '',
  'ptype' => 'sandbox' //   sandbox ou production
];

How To

To add items on checkout use:

 <form data-request="Pagseguro::onAdd" data-request-redirect="/checkout">

                        <input class="form-control" type="hidden" name="item[id]" value="1" >
                        <input class="form-control" type="hidden" name="item[name]" value="ebook octobercms">

                                  <div class="form-group"><label>Valor</label><input class="form-control" type="text" name="item[price]" min="1000" max="10000" required placeholder="minimo 1000.00"></div>
                            <button class="btn btn-primary btn-sm ml-2" type="submit">investir</button></div>
                            <div class="card-footer"><button class="btn btn-danger mtl-4" type="button"><i class="fa fa-file-pdf-o"></i> <strong>Informações</strong></button></div>
                        </form>

then with items in you "cart" you can checkout:

/checkout

<a href="#"
data-request='Pagseguro::onCheckout'
data-request-success='console.log(data.result)'
>checkout</a>
</br>
<a href="#"
data-request='Pagseguro::onClear'
data-request-success='console.log(data)'
>onClear</a>
1.0.7

support a user plugin

May 19, 2018

1.0.6

Updated table indev_pagseguro_

May 19, 2018

1.0.5

Updated table indev_pagseguro_

May 19, 2018

1.0.4

Updated table indev_pagseguro_

May 19, 2018

1.0.3

Updated table indev_pagseguro_

May 19, 2018

1.0.2

Created table indev_pagseguro_

May 19, 2018

1.0.1

Initialize plugin.

May 19, 2018