Coder Social home page Coder Social logo

mariominondo / cybersource-sa-sop-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from e-payment/cybersource-sa-sop-php

0.0 0.0 0.0 92 KB

CyberSource Secure Acceptance - Silent Order Post (PHP example)

JavaScript 82.29% PHP 15.48% CSS 1.19% HTML 1.04%

cybersource-sa-sop-php's Introduction

CyberSource Secure Acceptance

Configuration

To run the examples, first create a file config.php under directory payment

<?php

define('MERCHANT_ID', '<MERCHANT_ID>');
define('PROFILE_ID',  '<PROFILE_ID>');
define('ACCESS_KEY',  '<ACCESS_KEY>');
define('SECRET_KEY',  '<SECRET_KEY>');

// DF TEST: 1snn5n9w, LIVE: k8vif92e 
define('DF_ORG_ID', '1snn5n9w');

// PAYMENT URL
// TEST //
define('CYBS_BASE_URL', 'https://testsecureacceptance.cybersource.com/silent');
// LIVE //
//define('CYBS_BASE_URL', 'https://secureacceptance.cybersource.com/silent');

define('PAYMENT_URL', CYBS_BASE_URL . '/pay');
// define('PAYMENT_URL', '/payment/debug.php');

define('TOKEN_CREATE_URL', CYBS_BASE_URL . '/token/create');
define('TOKEN_UPDATE_URL', CYBS_BASE_URL . '/token/update');

// MERCHANT PSP
define('AGGREGATOR_ID', '<AGGREGATOR_ID>');       // String(11)
define('SALES_ORG_ID',  '<SALES_ORG_ID>');        // Integer(11)
define('MERCHANT_DESC', '<MERCHANT_DESCRIPTOR>'); // String(22)

// INQUIRY TRANSACTION
$rpt_username = '<RPT_USERNAME>';
$rpt_password = '<RPT_PASSWORD>';

// proxy
$proxy        = '<PROXY_HOST:PROXY_PORT>';

// EOF

Report Query

create a file report_config.php

<?php

date_default_timezone_set('UTC');

// TEST
define('REPORT_ENDPOINT', 'https://ebctest.cybersource.com/ebctest/Query');

// LIVE
//define('REPORT_ENDPOINT', 'https://ebc.cybersource.com/ebctest/Query');

define('MERCHANT_ID',  '<MERCHANT_ID>');
define('RPT_USERNAME', '<USERNAME>');
define('RPT_PASSWORD', '<PASSWORD>');

define('PROXY_ENABLE', false);
define('PROXY_HOST',   '127.0.0.1');
define('PROXY_PORT',   3128);
define('PROXY_AUTHEN', false);
define('PROXY_USER',   '<PROXY_USER>');
define('PROXY_PASS',   '<PROXY_PASS>');

// EOF

Test

php -t ./ -S 0.0.0.0:8088

Open Web Browser

Test Card

  Card Type      Card Number       3-D  ECI  Notes
  -------------  ----------------  ---  ---  -------------------------------
  Visa           4000000000000002   Y    5
  Visa           4111111111111111        7
  MasterCard     5200000000000007   Y    2
  MasterCard     5555555555554444        0
  JCB            3569990010083722   Y    5    Without authentication window
  JCB            3569960010083758   Y    6    Enrolled During Shopping
  JCB            3566111111111113        -

Reference

White-list IP address

All Secure Acceptance notification messaging will originate from a different range of servers and IP addresses. If you are using any Secure Acceptance services, you must add the following IP address ranges to any whitelist or filtering logic.

198.241.162.1 - 198.241.162.254
198.241.168.1 - 198.241.168.254

cybersource-sa-sop-php's People

Contributors

junlapong 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.