Instructions to send request to CyberSource to perform electronic payment.
- Related Documents
- Development Environment
- Function List
- Processing Flow
- Getting Started
- Data For Test
- Makefile
- Ruby version 1.9
- Docker version 19.03.1
-
From these data:
reference_number=123456789 transaction_type=sale,create_payment_token currency=usd amount=100.00 locale=en access_key=e2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p3 profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 transaction_uuid=02815b4f08e56882751a043839b7b481 signed_date_time=2013-07-11T15:16:54Z signed_field_names=access_key,profile_id,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,transaction_type,reference_number,amount,currency,payment_method,bill_to_forename,bill_to_surname,bill_to_email,bill_to_phone,bill_to_address_line1,bill_to_address_city,bill_to_address_state,bill_to_address_country,bill_to_address_postal_code unsigned_field_names=card_type,card_number,card_expiry_date,card_cvn payment_method=card bill_to_forename=Joe bill_to_surname=Smith [email protected] bill_to_address_line1=1 My Apartment bill_to_address_city=Mountain View bill_to_address_postal_code=94043 bill_to_address_state=CA bill_to_address_country=US
back_end create signature with
secret_key
signature=WrXOhTzhBjYMZROwiCug2My3jiZHOqATimcz5EBA07M=
-
Front-end send all above data and card information to CyberSource.
card_type=001 card_cvn=005 card_number=4111111111111111 card_expiry_date=12-2022
-
If data is invalid, response will have error code 403.
-
Depending on the value of the card, request will redirect to 3D Secure screen or customer response page.
-
Update key
Get key in the Business Center
cp config.rb.example config.rb
-
Build and run with docker
cd <project_path> docker build -t ruby_thin . docker run -v `pwd`:/my_app -p 3001:3001 -it ruby_thin /bin/bash
-
On brower
-
Chapter 6 - Test and View Transactions (Page 69)
If your OS is Linux or Mac, let use Makefile
make dev
make build
make run