Code Monkey home page Code Monkey logo

urway's Introduction

urway

Installation

You can install the package via Composer.

composer require maree/urway

Publish your urway config file with

php artisan vendor:publish --provider="maree\urway\UrwayServiceProvider" --tag="urway"

then change your urway config from config/urway.php file

    "merchantKey"  => "" ,
    "name"         => "" ,
    "password"     => "" ,

Usage

  • with [ visa - master - mada ]
use maree\urway\Urway;
$customerInfo = ['email' => '[email protected]'];
Urway::checkout($amount = 1.0 , $customerInfo);  
  • with [ stc ]
use maree\urway\Urway;
$customerInfo = ['email' => '[email protected]'];
Urway::checkoutStc($amount = 1.0 , $customerInfo);  

note

  • define (callback) the checkout return response url route with urway team EX: https://mysite.com/paymentresponse
  • create route for response url 'paymentresponse' EX: Route::get('paymentresponse', 'PaymentsController@paymentresponse')->name('paymentresponse');
  • create function for checkout response 'paymentresponse'
  • use that function to check if payment failed or success

inside 'paymentresponse' function use:

use maree\urway\Urway;
$response = Urway::checkoutResponseStatus();  

return response like:

['key' => 'success' ,'msg' => 'checkout success' ,'result' => $result ,'data' => $_GET ]  

or

['key' => 'fail' , 'msg' => 'checkout failed','result' => $result ,'data' => $_GET ] 

note: you can use response from data to save transactions in database - 'data' key contain params like 'amount' and 'TranId' => transaction id

  • Test Card Details
  • Card Number: Master:5123450000000008 - Visa: 4508 7500 1574 1019
  • CVV: 100
  • Expiry Date: 05/23
  • Card Name: Test Family
  • Custom ECI: Leave Blank
  • Custom CAVV: Leave Blank

for code errors open urway documentaion file.

current urway package payment ways :

  • visa
  • master
  • mada
  • stc

urway's People

Contributors

mohamedmaree avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.