Advertisement
Guest User

paytabs request body

a guest
Aug 6th, 2018
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.10 KB | None | 0 0
  1. array(
  2.             //Customer's Personal Information
  3.            
  4.             'cc_first_name'     => $user['User']['name'],          //This will be prefilled as Credit Card First Name
  5.             'cc_last_name'      => $user['User']['name'],            //This will be prefilled as Credit Card Last Name
  6.             'cc_phone_number'   => '00966',
  7.             'phone_number'      => $user['User']['mobile_number'], // Classera phone number
  8.             'email'             => $user['User']['email'],
  9.            
  10.             //Customer's Billing Address (All fields are mandatory)
  11.             //When the country is selected as USA or CANADA, the state field should contain a String of 2 characters containing the ISO state code otherwise the payments may be rejected.
  12.             //For other countries, the state can be a string of up to 32 characters.
  13.             'billing_address' => "riyadh SAU",
  14.             'city' => "riyadh",
  15.             'state' => "riyadh",
  16.             'postal_code' => "00966",
  17.             'country' => "SAU",
  18.            
  19.             //Customer's Shipping Address (All fields are mandatory)
  20.             'address_shipping' => "Riyadh SAU",
  21.             'city_shipping' => "riyadh",
  22.             'state_shipping' => "riyadh",
  23.             'postal_code_shipping' => "00966",
  24.             'country_shipping' => "SAU",
  25.            
  26.            //Product Information
  27.             "products_per_title" => "Enroll course",   //Product title of the product. If multiple products then add “||” separator
  28.             'quantity' => "1",                                    //Quantity of products. If multiple products then add “||” separator
  29.             'unit_price' => $amount,                                  //Unit price of the product. If multiple products then add “||” separator.
  30.             "other_charges" => "0.00",                                     //Additional charges. e.g.: shipping charges, taxes, VAT, etc.
  31.            
  32.             'amount' => $amount,                                          //Amount of the products and other charges, it should be equal to: amount = (sum of all products’ (unit_price * quantity)) + other_charges
  33.             'discount'=> '0.0',                                                //Discount of the transaction. The Total amount of the invoice will be= amount - discount
  34.             'currency' => 'SAR',                                            //Currency of the amount stated. 3 character ISO currency code
  35.            
  36.  
  37.            
  38.             //Invoice Information
  39.             'title' => $user['User']['name'],               // Customer's Name on the invoice
  40.             "msg_lang" => "en",                 //Language of the PayPage to be created. Invalid or blank entries will default to English.(Englsh/Arabic)
  41.             "reference_no" => "1231231",        //Invoice reference number in your system
  42.            
  43.            
  44.             //Website Information
  45.             "site_url" => "http://svaapi.classera.com",      //The requesting website be exactly the same as the website/URL associated with your PayTabs Merchant Account
  46.             'return_url' => "http://svaapi.classera.com/Payments/verify_payment/lecture_id:$lecture_id/u_id:$user_id/program_id:$program_id/http_origin:$http_origin/?access_token=a3d8c21b54c8ad8e4cc0d7d066b476c2ce9da709",
  47.             "cms_with_version" => "API USING PHP",
  48.  
  49.             "paypage_info" => "1"
  50.         );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement