Language

Introduction

Payzaty payment SDKs and Plugin means you can simply integrate the payment form with your site, system and store, so you can quickly and securely accept payments from your customers.
They will be able to pay for products and services using cards, including Mada, Visa and Mastercard, and mobile payments including Apple Pay and STC pay.

Brief description

  • Customer chooses product or service in merchant online shop and adds it to his cart
  • Merchant places payment button which will redirect customer to Payzaty payment page
  • Customer clicks payment button at merchant site and it redirects him to payment page
  • Customer enters payment details at payment page on Payzaty payment site.
  • Payzaty handles the payment process.
  • Payzaty redirects the customer to a merchant site with a checkout number.
  • Merchant accesses the status of payment and shows the result page with payment details.

Authentication

To use Payzaty SDKs and Plugin you have to authenticate your account by merchant number and secret key. You can access your merchant number and secret key in your merchant dashboard.

Going Live

Once you’re done developing your Payzaty integration and you’re ready to go live, simply you can disable the sandbox parameter.

Payment language

Payzaty payment page is a multi-language page, so you can detect its language by language parameter.

Errors

Code Text
PE400 Merchant No or Secret Key is incorrect
PE420 Parameter `{param_name}` is missing
PE421 Parameter `{param_name}` is incorrect
PE0100220 Invalid card number
PE0100180 Authentication Not Available.

Android

1- Install the library

Open build.gradle (app:module ) file
Add Library dependency on `dependencies` block
implementation("com.github.Payzaty:payzaty-android-sdk:v1.1.0 ")
Open build.gradle ( project:module ) file Add jetpack
repository on `repositories` block
maven { url 'https://jitpack.io' }

2-Initialize the library

                            
                      Payzaty client = Payzaty.init( MERCHANT_NO , SECRET_KEY, LANGUAGE , SANDBOX ) ;

                    
                  

3- Checkout

                            
                      CheckoutRequest request = new CheckoutRequest(name, Email, PhoneCode, PhoneNumber, Amount, CurrencyID,  ResponseUrl,UDF1);

client.checkout(CONTEXT,  request , new CheckoutHandler() { 

@Override 
public void onSuccess(CheckoutResponse response) { 
Log.d("Payzaty" , "onSuccess: " + response.status);
} 

@Override 
public void onFailure(PayzatyException e) { 
Log.d("Payzaty" , "onFailure: " + e.getLocalizedMessage()); 
} 
});

                    
                  

IOS

1- Install the library using Swift package manager

To install Payzaty package via Xcode
  • Go to xcode project configuration from the left list “the blue icon”
  • Select your project
  • Select package Dependencies
  • Select add new dependency “+”
  • Then search for https://github.com/Payzaty/Payzaty-ios-sdk.git
  • Then add package

2-Initialize the library

                            
                      let pay = Payzaty(currentVC: UIViewController , merchantNo: “your merchant number ", secretKey: "your secret key", language: "selected language ar\en ", sandbox: Bool)
                    
                  

3- Checkout

                            
                      pay.checkout(name: "Wajed Isleem", email: "wajed@payzaty.com", phoneCode: "966", PhoneNumber: "12345678", amount: 50, currencyID: 1, responseUrl: "1", UDF1: nil, UDF2: nil, UDF3: nil)
                       { result in print(result) } 
                       onFailure: { error in print(error.localizedDescription) }

                    
                  

PHP

1- Install the library

                                
                                    composer require payzaty/client
                                
                                

2-Initialize the library

                                
                                    $client = new \Payzaty\Client(MerchantNo, SecretKey , Language , IsSandbox);
                                
                            

3- Checkout

                                
                                    $resp = $client->checkout(CustomerName, CustomerEmail, CustomerPhoneCode, CustomerPhoneNumber, Amount, Currency, UDF1, UDF2, UDF3, ResponseUrl);
                                    if($resp->success){
                                        echo $resp->checkoutId . '
'; echo $resp->checkoutUrl; }else{ echo $resp->error . '
'; echo $resp->errorText; }

4- Get payment status

                                
                                    $resp = $client->getStatus(CheckoutID);
                                    if ($resp->success) {
                                        echo $resp->paid . '
'; echo $resp->status . '
'; echo $resp->udf1 . '
'; echo $resp->udf2 . '
'; echo $resp->udf3; } else { echo $resp->udf1 . '
'; echo $resp->udf2 . '
'; echo $resp->udf3 . '
'; echo $resp->error . '
'; echo $resp->errorText; }

Java

1- Install the library

1.A Maven
Open pom.xml file
Add on `dependencies` tag this dependency
                                
                        <dependency>
                        <groupId>com.github.Payzaty.payzaty-java-sdk</groupId>
                        <artifactId>payzaty</artifactId>
                        <version>v1.1.0</version>
                        </dependency>
                      
                    
And on `repositories` tag put this repo :
                                
                        <repository>
                          <id>jitpack.io</id>
                          <url>https://jitpack.io</url>
                        </repository>
              
                      
                    
1.B Gradle
Open build.gradle file on root project
Put this line on `repositories` block
                                
                        maven { url 'https://jitpack.io' }
                      
                    
Put this line on `dependencies` block
                            
                      implementation (“com.github.Payzaty.payzaty-java-sdk:payzaty:v1.1.0”)
                    
                  

2-Initialize the library

                            
                      Payzaty client = Payzaty.init( MERCHANT_NO , SECRET_KEY, LANGUAGE , SANDBOX ) ;
                    
                  

3- Checkout

                            
                      CheckoutRequest request = new CheckoutRequest(name, Email, PhoneCode, PhoneNumber, Amount, CurrencyID,  ResponseUrl,UDF1);

                      client.checkout(request, new CheckoutHandler() {
                                 @Override
                                 public void onSuccess(CheckoutResponse response) {
                                     System.out.println("Payzaty: onSuccess = " + response.success);
                                 }
                     
                                 @Override
                                 public void onFailure(PayzatyException e) {
                                     System.out.println("Payzaty: onFailure = " + e.getLocalizedMessage());
                                 }
                             });            
                    
                  

4- get Status

                            
                      client.getStatus(CHECKOUT_ID , new PaymentStatusHandler() {
                        @Override
                        public void onStatus(StatusResponse response) {
                           System.out.println("Payzaty: onSuccess = " + response.status);
                        }
            
                        @Override
                        public void onFailure(PayzatyException e) {
                           System.out.println("Payzaty: onFailure = " + e.getLocalizedMessage());
                        }
                    });
                    
                  

Cookies Use

This website uses cookies in order to ensure that we provide the best experience on our website

Accept Read privacy policy