miladxandi/paymes-sdk

Paymes payment gateway PHP SDK

0.0.1.5 2023-11-29 09:08 UTC

This package is auto-updated.

Last update: 2024-03-29 09:55:27 UTC


README

// Enter the details of the payment
$data = [
    'orderId' => '1',
    'price' => '1000',
    'currency' => 'TRY',
    'productName' => "Jascket",
    'buyerName' => "User Name",
    'buyerPhone' => "+1123457890",
    'buyerEmail' => "username@example.com",
    'buyerAddress' => "Temcula Road, California, Los Angeles",
    'create_order_by_kiosk' => false,
];


//set default configurations
$paymes = new OrdersService('PUBLIC_KEY','SECRET_KEY');


//generate payment link
$result = $paymes->create($data);


//redirect to payment page
return redirect($result['returnUrl']);