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. |
Payzaty client = Payzaty.init( MERCHANT_NO , SECRET_KEY, LANGUAGE , SANDBOX ) ;
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());
}
});
let pay = Payzaty(currentVC: UIViewController , merchantNo: “your merchant number ", secretKey: "your secret key", language: "selected language ar\en ", sandbox: Bool)
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) }
composer require payzaty/client
$client = new \Payzaty\Client(MerchantNo, SecretKey , Language , IsSandbox);
$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;
}
$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;
}
<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>
maven { url 'https://jitpack.io' }
implementation (“com.github.Payzaty.payzaty-java-sdk:payzaty:v1.1.0”)
Payzaty client = Payzaty.init( MERCHANT_NO , SECRET_KEY, LANGUAGE , SANDBOX ) ;
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());
}
});
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());
}
});