Metadata-Version: 2.1
Name: geopagos
Version: 0.0.1
Summary: Unoffial geopagos sdk to work with apps like (Viumi, Getnet, OpenPay, Taca Taca, Toque, Sipago...).
Author-email: Alvez Gerardo <alvezpope@gmail.com>
Project-URL: Homepage, https://github.com/alvezgr/unofficial-gp-sdk/
Project-URL: Issues, https://github.com/Alvezgr/unofficial-gp-sdk/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENCE

# Unofficial Geopagos APPS (Getnet, Viumi...) Python SDK 

This sdk provides basic methos to integrate geopagos apps (Getnet, Viumi, OpenPay, Taca Taca, Toque, Sipago, Uala Bis) payment API for a platform to start receiving payments.

## Requirements

python3
requests


## Installation 

Run ```git clone git@github.com:Alvezgr/unofficial-gp-sdk.git```

## Getting Started
Before you begin, you must request the API credential from your supplier (Getnet, Viumi, OpenPay, Taca Taca, Toque, Sipago, Uala Bis)

Request the your `Access Token` to the [geopagos auth](https://auth.geopagos.com/oauth/token) and API url

### Simple usage
  
```python
import gp

sdk = gp.SDK("ACCESS_TOKEN", "https://api.url.com")

order_data = {
  "data": {
    "attributes": {
      "redirect_urls": {
        "success": "https://www.mitienda.com/success",
        "failed": "https://www.mitienda.com/failed"
      },
      "shipping": {
        "name": "Correo Argentino",
        "price": {
          "currency": "032",
          "amount": 450
        }
      },
      "items": [
        {
          "name": "Lomo con papas",
          "unitPrice": {
            "currency": "032",
            "amount": 10050
          },
          "quantity": 2
        },
        {
          "unitPrice": {
            "currency": "032",
            "amount": 1
          },
          "quantity": 1
        }
      ],
      "externalData": "{\"NroLegajo\": 25993}"
    }
  }
}

result = sdk.order().create(order_data)
payment = result["response"]

print(payment)
```
## Documentation 

Visit apps site for docs:
 - [Getnet](https://developers-sdk-documentation-site-santander.preprod.geopagos.com/)
 - [Viumi](https://developers.viumi.com.ar/)

Check our official code reference to explore all available functionalities.

## Tests
Ensure to define 
```bash
export ACCESS_TOKEN=access_token
export INVALID_ACCESS_TOKEN=invalid_token
export ORDER_ID=and_order_uuid
export API_URL=your_provider_url

```
```bash
pytest tests/
```

## Contributing

All contributions are welcome.

