Metadata-Version: 2.4
Name: ocyan.plugin.payment_multisafepay
Version: 0.2.0
Summary: MultiSafepay redirect-payment adapter for Ocyan Oscar.
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: ocyan.core<2,>=1.2.14
Requires-Dist: django-oscar<5,>=4.2
Requires-Dist: ocyan.plugin.oscar<3,>=2.0.5
Requires-Dist: ocyan.plugin.oscar_checkout<2,>=1.3.3
Requires-Dist: ocyan.plugin.oscar_communications<3,>=2.0.7
Requires-Dist: ocyan.plugin.oscar_shipping<2,>=1.3.2
Requires-Dist: multisafepay<0.4,>=0.3
Provides-Extra: test
Requires-Dist: pytest<10,>=8; extra == "test"
Requires-Dist: responses<1,>=0.25; extra == "test"
Requires-Dist: coverage<8,>=7; extra == "test"
Requires-Dist: black<26,>=24; extra == "test"
Requires-Dist: pylint<4,>=3; extra == "test"

# Ocyan plugin payment_multisafepay

This package is the server-side MultiSafepay redirect-payment adapter for
Ocyan Oscar. It owns order request construction, redirect hand-off, retrieval
of the authoritative provider order state, and idempotent local payment-status
updates. It does not store API keys, decide tax policy, or perform live calls
during package certification.

The configured notification endpoint must be publicly reachable over HTTPS.
New order requests set MultiSafepay's notification method to `POST`; the
adapter retains GET handling only for existing website-level configurations.
For either method, it fetches the current provider order before applying a
local update and returns `OK` only after the update path completes.

Use a test API key only in a separately approved integration environment.
Credentials belong in the MandelBlog configuration/secret boundary and must
never be committed.

Installation
------------
1. Add `ocyan.plugin.payment_multisafepay` to your projects dependencies.
2. Add CONFIG to your config/ocyan.json  (if you're a dumbfk and not using the GUI, like me :-])
3. Follow one of the guides below depending on your preference.

## MULTISAFEPAY
1. Ga naar https://testmerchant.multisafepay.com/ en maak een test account (of login als je al een account hebt).
2. In het dashboard ga naar Instellingen > Website-instellingen en klik op "Snel een website toevoegen" rechtsbovenin.
3. Vul alle gegevens in.
4. Als je stap 3 goed gedaan hebt dan krijg je nu een 'Site ID' en 'Secure Code' te zien.
5. Vul de gegevens in je GUI of config/ocyan.json.

## SETUP (GUI)
1. Volg alle stappen van MULTISAFEPAY.
2. Vul overige gegevens in en vink aan welke betaalmethode je wilt gebruiken.
3. Zet aan welke payment method je wilt gebruiken.
4. Ga nu testen of alles goed gaat.

## SETUP (ZONDER GUI)
1. Volg alle stappen van MULTISAFEPAY.
2. Open je project in je favoriete text editor.
3. Zoek naar een config/ocyan.json in de root van je project.
4. Voeg alle ontbrekende elementen uit CONFIG toe.
5. Check of 'ocyan.plugin.payment_multisafepay' in buildout.cfg staat.
	6. Staat er WEL erin? Ga door naar stap 6.
	7. Staat er !NIET! in? Voeg sources eraan toe. Zie SOURCES en voeg ontbrekende elementen. Done? ga door naar stap 6.
6. voeg CONFIG toe aan je config/ocyan.json (of welke json je ook mag gebruiken)
7. Als alles ingevuld is voer het volgende uit in je console 'make all'
8. Als alles ingevuld is & je hebt stap 7 gedaan. Voer het volgende uit in je console 'make buildout'
8. Ga nu testen of alles goed gaat.

## Testen per betaalmethode
Voor het testen van alle betaaltmethoden is bepaalde invoer benodigd. Deze staan uitgelegd in de documentatie
van multisafepay: https://docs.multisafepay.com/faq/getting-started/test-payment-details/

# Belangerijke punten voor live gang.
1. Zorg dat je het juiste protocol invoerd. (http of https)
2. Zorg ervoor dat de /shop/notify/ url bereikbaar is. Daarnaast test het ook even.
3. Basis url moet correct zijn -> http://kitchensink.welkombij.highbiza.nl/
4. Notify url moet correct zijn -> http://kitchensink.welkombij.highbiza.nl/shop/notify/
5. Als de klant NIEUW is bij multisafepay, zorg ervoor dat de site aan alle eisen voldoet.

### Test Notify URL (Order number moet bestaan!!!):
1. Ga naar http://YOURDOMAIN.nl/shop/notify/?transactionid=ORDER_NUMBER
2. Sta je op de pagina?
    3. Ja. Krijg je een 'Ok' terug? dan is alles goed gegaan en is de order geupdate.
    4. Ja, maar ik krijg een error!! -> Ga naar https://git.uwkm.nl/ocyan_plugins/ocyan.plugin.payment_multisafepay/issues en maak een issue aan.
    5. Nee? GTFO.
    
### CONFIG
```
Frets
"payment_multisafepay",

Settings
"payment_multisafepay": {
  "api_key": "<your_api_key>",
  "testing": true,
  "IDEAL": true,
  "BANKTRANS": true,
  "BELFIUS": true,
  "MAESTRO": true,
  "DIRECTBANK": true,
  "MISTERCASH": true,
  "GIROPAY": true,
  "MASTERCARD": true,
  "TRUSTLY": true,
  "VISA": true,
  "PAYPAL": true,
  "KBC": true,
  "INGHOME": true
  "PAYAFTER": true,
  "AMERICAN_EXPRESS": true,
  "IN3": true,
  "AFTERPAY": true,
}

Note: All payment methods shown above are disabled by default, so you NEED to set them to true if you want to use them.

ocyan_plugins
"ocyan.plugin.payment_multisafepay",
```

### SOURCES
```
Voeg bij '[sources]' het volgende toe:
ocyan.plugin.payment_multisafepay = git ssh://git@git.uwkm.nl:2222/ocyan_plugins/ocyan.plugin.payment_multisafepay.git

Voeg bij 'sources-to-build =' het volgende toe:
ocyan.plugin.payment_multisafepay
```

### Notify url
https://domain.nl/shop/notify/
