dependencies:
payu:
git:
url: https://github.com/PayU-EMEA/PayU-Flutter.git
path: payu
import 'package:payu/payu.dart';
There is an example
project with predefined public Sandbox
environment which you can run. This app will help you to understand basic scenarios of integration.
- Download the repository
- Open in editor (
Visual Studio Code
,Android Studio
, etc.) - Select device where you want to run (
iOS
,Android
) - Run
example
configuration.
Package gives a set of components for: pay-by-link, one-time card payments, storing card options, scanning card data, and one-click payments (Google Pay, Apple Pay, BLIK). Card is processed via Payu Backend and package sends request, but each merchant will receive card tokens in retrieve method, so the card data does not go through merchant backend. User Interface in package can be adjusted to merchant branding / style guide.
Merchant Server - Payu Server means that call is made from merchant server to Payu REST API. Merchant Mobile App means that action is called inside merchant mobile application. Package heavily depends on communication between merchant and Payu backends. Package won't create order for merchant so this responsibility will be ceeded to merchant server. With this approach there is no need to create and use mobile oAuth token, but merchant application will need to pass all important data to package.
Shopping Context
- is Merchant Exclusive FlowCheckout Context
- is a part when merchant need to obtain payment methods from PayU backend. For this merchant needs to implement OAuth & Payment methods retrieve. Then Merchant Mobile App can display payment methodsPayment Context
- is a transaction part. When merchant on backend create an OrderCreateRequest. This request start transaction process.Payment Context
- when order has been created, then Merchant Mobile App must handle the result of the response. Please visit detailed documentation on how to handle possiblestatusCode
forOrderCreateResponse
.
- User select products and create cart in
Merchant Mobile App
and tap for ex.Checkout
button Merchant Mobile App
send the request to theMerchant Backend
to get the list of available payment methods (see how to get the payment methods here)Merchant Mobile App
present the list of available payment methods, for ex. using PaymentMethodsPage or PaymentMethodsWidget- User select the neccessary payment method from the list of presented
Merchant Mobile App
send the selected payment method with cart details to theMerchant Backend
(see how to send selected method here)Merchant Backend
sendOrderCreateRequest
with user details, products details and payment method details and return the result ofOrderCreateResponse
toMerchant Mobile App
(see how to makeOrderCreateRequest
hereMerchant Mobile App
handle the result ofOrderCreateResponse
(see how to handle the result ofOrderCreateResponse
here
TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.