Уважаемые IT люди,
Прошу Вас, может ли кто из вас сделать дело в кредит?
Стартую с неплохим проектом почти без денег.
Нужна интеграция сайта с платежной системой Mercaway.com и с менеджером партнерской программы (Affiliate PRO скрипт, описание и демо - softservice.org)
Я плохо в этом разбираюсь, если для этого дела непременно нужна Shoping Cart, то можно использовать, вроде бесплатную (open source) osCommerce MS2 (oscommerce.com).
Пример сайта, принимающего Mercaway (правда, без партнерской программы - пример только работы с этой плат системой)
http://malwaredestructor.com/buy.php?sid=7o7a41lmm6igp5jbpspkn9hbl1Пишите
sssiiirrr@yahoo.com
-----------------------
Больше вложений делать не дают, поэтому что не ушло во вложениях - приведу здесь
1
Technical Documentation:
Payment Module Integration
Version 1.4
Ressources:
- ISO Codes (2 characters and 3 characters) and translation in French and English of the Countries.
To make before any programming:
In the Mercaway Backoffice, please do to “My Shop / My Account”:
Edit the following fields:
Website Address
Domain Name of your Online Shop. If you integrate the Mercaway Payment Module, it is the URL address used
for the sending of the data to Mercaway.
Security Key for the Payment Module
Security Key used during the Mercaway Payment Module integration. After each password modification, the
Security Key is changed. It is recommended to modify it regularly.
Return URL for the data after the Order
When an Order is done via the Mercaway Payment Module, information depending on the validity of the Credit
Card is sent to the URL address.
Redirect URL after the Order (Accepted)
In the case of the Payment Module use, when the Order is terminated and Accepted on Mercaway, the Client is
redirected to this URL address.
Redirect URL after the Order (Declined)
In the case of the Payment Module use, when the Order is terminated and Declined on Mercaway, the Client is
redirected to this URL address.
Redirect URL of the "Cancel" button on the Payment Page (see details at the page 9/9)
When the Client clicks on the "Cancel" button of the Payment Module, he is redirected automatically to the
specified URL address.
Important
Security Systems have been installed to warn you against any hacking attempt. Thus you have to do your
integration directly from the Shop URL address indicated in the Backoffice. The integration of the Payment
Module will not work if you do it from another URL address (eg: localhost).
Communication with the Payment Module
1) Sending a payment
- URL of destination of the variables:
o
https://www.mercaway.com /payment/shop2mercaway.php
- Variables to send by the POST method
o (Important note, all the values are « string »)
st
1 Case
Your Items have been entered manually or by the « upload of a file of Items » via the Mercaway
Backoffice
In this case, you have to send the variables listed in the following table:
* Mandatory field
Heading Variable Values Comments
Language lang Code ISO 2 characters in lang=fr
capital letter of the language lang=en
References of the ref[] Item Reference to buy.
Put as many time « ref[] » that there are
Items Important note, the Item
references.
Reference sent must be the
Example:
one entered in the Item
ref[]=ma_ref1
Backoffice page on
ref[]=ma_ref2
Mercaway.
Items Quantity of the qte[« ref »] Quantity of the bought Items. Put as many time « qte [« ref »] » that there are
Items By reference. references.
Example:
qte[ma_ref1]=2
qte[ma_ref2]=1
Prices of the Items price[« ref »] Unit Price exc. Tax of the Put as many time « qte [« ref »] » that there are
Items. By reference. references.
Example:
price[ma_ref1]=12.43
price[ma_ref2]=14.23
Security Key key Given in your Backoffice.
Website site Entered in your Backoffice.
Amount of the fdp Total Price exc. Tax of the Example:
Shipping Fees Shipping Fees. fdp=25.00
Discount Coupon reduction Amount inc. Tax of the
Example:
Discount Coupon to deduct
reduction=12.90
from the Total Amount inc.
Tax of the Order.
Important note, it is a positive number with 2
decimals at maximum.
Currency devise ISO Code 3 characters in Possible values at the present time:
capital letter of the currency EUR; USD; GBP
of the transaction.
Example:
devise=EUR
Carrier transporteur Heading of the Shipping Example for the Products:
Method used for the delivery transporteur=Fedex
of the Order.
Example for the E-Products:
transporteur=Downloading
Example for the E-Services:
transporteur=Login Info Sending
Data to receive data_send Data returned as it is. Advice:
Encoder the value into base64. If you use a
table (array) serialized it (function PHP
serialize(mixed var)) then encoder it
(base64_encode(string var)).
Payment Methods mdp Identifier (ID) of the Payment
Example:
Method to use.
Mdp=0 corresponds to the One Time Payment
mdp=432 corresponds to a Payment Method
By default: 0
you configured in your Backoffice.
For more details about this functionality, you can refer to the appendix « Payment
Methods ».
Mode* mode 1st option: test1
This variable permits to send Orders which will
or: test2
not be registered.
or: production
mode=test1 payment accepted
By default: test1
mode=test2 payment declined
mode=production (in production)
Credit Card number for the tests:
4978000000000000
Important note, in test mode, the used price
update automatically the price already available
in the Mercaway database.
nd
Case
2
Your Items have not been entered via the Mercaway Backoffice – The Payment Module is used to add /
update automatically your Items
st
In this case and in addition to the variables indicated in the 1
Case, you have to send the variables listed in the
following table in order to add / update automatically your Items:
* Mandatory field
Heading Variable Values Comments
French Heading intitule_fr[« ref »] French Heading of the The French Heading is optional for a
Item Shop selling Items in French.
English Heading* intitule_en[« ref »] English Heading of the The English Heading is mandatory for
Item a Shop selling Items in English.
French Description description_fr[« ref »] French Description of the The French Description is optional for
Item a Shop selling Items in French.
English Description description_en[« ref »] English Description of the The English Description is
Item recommended for a Shop selling Items
in English.
Brand marque[« ref »] Item Brand There is no default value. If the
variable Item Brand is not sent, the
field will be empty.
Incrementing pas[« ref »] Incrementing Number for The Incrementing Number is put at 1
Number the Item by default if you do not send a variable
for this field.
Maximum Quantity nb_maxi[« ref »] Maximum quantity of The Maximum Quantity is put at 10 by
Items per Order default if you do not send a variable for
this field.
Photo URL url[« ref »] Photo URL for the Item It is recommended to indicate this URL
with the http in order that the Item Photo can be
viewable on Mercaway.
Warranty garantie[« ref »] Warranty of the Product Warranty of the Product. This field is
(eg: International, 2 not defined for the E-Products or E-
years…) Services. Limited to 40 characters
maximum.
Sale Unit uv[« ref »] UNIT_1: per unit
The Sale Unit is put by default as
UNIT_2: g
UNIT_1.
UNIT_3: kg
UNIT_4: L
Net Weight poids_net[« ref »] Product Net Weight in g It is recommended to indicate the
Product Net Weight in order that it can
be viewable on Mercaway.
Gross Weight Poids_brut[« ref »] Product Gross Weight in g It is recommended to indicate the
Product Gross Weight in order that it
can be viewable on Mercaway.
Packing Weight Poids_suremballe[« ref »] Product Weight with It is recommended to indicate the
Packing in g Product Packing Weight in order that it
can be viewable on Mercaway.
Billing Information
Heading Variable Values Comments
Gender fact_genre 0 for Mr
1 for Mrs
2 for Ms
Company fact_societe Company name of the Client
(optional)
VAT Intracom Number fact_tva_intra VAT Intracom Number
(optional)
Last Name* fact_nom Last Name of the Client
First Name* fact_prenom First Name of the Client
Phone fact_telephone Phone of the Client (optional)
Mobile fact_mobile Mobile of the Client
(optional)
Address* fact_adresse Address of the Client
Postal Code / ZIP fact_cp Postal Code / Zip of the
Client
City* fact_ville City of the Client
State fact_etat State of the Client (USA and
Canada)
Country* fact_id_pays ISO Code 2 or 3 characters Use the file pays.sql
Email* fact_email Email of the Client
(MANDATORY)
Shipping Information
Heading Variable Values Comments
Gender liv_genre 0 for Mr
1 for Mrs
2 for Ms
Company liv_societe Company name of the Client
(optional)
Last Name* liv_nom Last Name of the Client
First Name* liv_prenom First Name of the Client
Phone liv_telephone Phone of the Client (optional)
Mobile fact_mobile Mobile of the Client
(optional)
Address* liv_adresse Address of the Client
Postal Code / ZIP liv_cp Postal Code / Zip of the
Client
City* liv_ville City of the Client
State liv_etat State of the Client (USA and
Canada)
Country* liv_id_pays ISO Code 2 or 3 characters Use the file pays.sql
Email liv_email Email of the Client
(optional)
nd
Code sample (2 Case only)
<form method="post" action="
https://www.mercaway.com/payment/shop2mercaway.php">
<input type="hidden" name='lang' value="en" />
<input type="hidden" name='ref[]' value="Item 0" />
<input type="hidden" name='qte["Item 0"]' value="1" />
<input type="hidden" name='price["Item 0"]' value="10.00" />
<input type="hidden" name='intitule_fr[Item 0]' value="Item 0 fr" />
<input type="hidden" name='intitule_en[Item 0]' value="Item 0 en" />
<input type="hidden" name='ref[Item 1]' value="Item 1" />
<input type="hidden" name='qte[Item 1]' value="2" />
<input type="hidden" name='price[Item 1]' value="15.00" />
<input type="hidden" name='intitule_fr[Item 1]' value="Item1 fr" />
<input type="hidden" name='intitule_en[Item 1]' value="Item1 en" />
<input type="hidden" name='transporteur' value="Carrier Name" />
<input type="hidden" name='data_send' value="Shop Data" />
<input type="hidden" name='key' value="Your Security Key" />
<input type="hidden" name='site' value="
http://www.your_shop.com/page.html" />
<input type="hidden" name='fdp' value="5.00" />
<input type="hidden" name='devise' value="USD" />
<input type="hidden" name='mode' value="test1" />
<input type="hidden" name='fact_genre' value="0" />
<input type="hidden" name='fact_societe' value="Company Client" />
<input type="hidden" name='fact_tva_intra' value="VAT Intracom Client" />
<input type="hidden" name='fact_nom' value="Last Name Client" />
<input type="hidden" name='fact_prenom' value="First Name Client" />
<input type="hidden" name='fact_telephone' value="Phone Client" />
<input type="hidden" name='fact_mobile' value="Mobile Client" />
<input type="hidden" name='fact_adresse' value="Address Client" />
<input type="hidden" name='fact_cp' value="Postal Code / ZIP Client" />
<input type="hidden" name='fact_ville' value="City Client" />
<input type="hidden" name='fact_etat' value="State / Province Client" />
<input type="hidden" name='fact_id_pays' value="ISO Code Country Client" />
<input type="hidden" name='fact_email' value="Email Client" />
<input type="hidden" name='liv_genre' value="0" />
<input type="hidden" name='liv_societe' value="Company Client" />
<input type="hidden" name='liv_nom' value="Last Name Client" />
<input type="hidden" name='liv_prenom' value="First Name Client" />
<input type="hidden" name='liv_telephone' value="Phone Client" />
<input type="hidden" name='liv_mobile' value="Mobile Client" />
<input type="hidden" name='liv_adresse' value="Address Client" />
<input type="hidden" name='liv_cp' value="Postal Code Client" />
<input type="hidden" name='liv_ville' value="City Client" />
<input type="hidden" name='liv_etat' value="State / Province Client" />
<input type="hidden" name='liv_id_pays' value=" ISO Code Country Client" />
<input type="hidden" name='liv_email' value="Email Client" />
<input type="submit" value="Pay via Mercaway" />
Description of the errors
Code Reason
#0000 One or several variable(s) is / are missing.
#0001 The calling URL address has a different value of the
variable « site ».
#0002 The website is not registered on Mercaway. Check the
URL address of the website given in the Backoffice.
#0003 The Security Key is wrong.
#0004 One of the ordered Item References doesn’t exist in
the Mercaway Items Database and it cannot be
created automatically with the send information (Case
2). A detailed email is sent to the Shop.
#0005 et #0006 Internal error, please contact our Mercaway technical contact.
--------
2. lang/en/mercaway.php
<?php
/*
$Id: mercaway.php,v 1.7 2007/15/02 16:14:23 $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('MODULE_PAYMENT_MERCAWAY_FRONT_TITLE', 'Mercaway <img src="
http://www.mercaway.com/buy/buy_by_mercaway.php" border="0" alt="Payment via Mercaway" />');
define('MODULE_PAYMENT_MERCAWAY_TEXT_TITLE', 'Mercaway');
define('MODULE_PAYMENT_MERCAWAY_DESCRIPTION', '<u><a href="
http://www.shop.mercaway.com/" target="new">Open a new Mercaway Shop Account</a></u>');
define('MODULE_PAYMENT_MERCAWAY_ACTIVATE_TITLE', 'Activate the Mercaway Payment Module');
define('MODULE_PAYMENT_MERCAWAY_ACTIVATE_TDESCRIPTION', 'Display the Mercaway Payment Module on the page for the choice of the Payment Method of your Shop');
define('MODULE_PAYMENT_MERCAWAY_WEBSITE_TITLE', 'URL address of your website');
define('MODULE_PAYMENT_MERCAWAY_WEBSITE_DESCRIPTION', 'URL address saved in the Mercaway Backoffice');
define('MODULE_PAYMENT_MERCAWAY_KEY_TITLE', 'Security Key');
define('MODULE_PAYMENT_MERCAWAY_KEY_DESCRIPTION', 'The Security Key is viewable in your Mercaway Backoffice');
define('MODULE_PAYMENT_MERCAWAY_PROD_TITLE', 'Mode');
define('MODULE_PAYMENT_MERCAWAY_PROD_DESCRIPTION_VALIDE', 'Payment accepted');
define('MODULE_PAYMENT_MERCAWAY_PROD_DESCRIPTION_REFUSEE', 'Payment rejected');
define('MODULE_PAYMENT_MERCAWAY_PROD_DESCRIPTION_PRODUCTION', 'Production');
define('MODULE_PAYMENT_MERCAWAY_SORT_TITLE', 'Sort the order of display');
define('MODULE_PAYMENT_MERCAWAY_SORT_DESCRIPTION', 'Sort the order of display of the Mercaway Payment Module on the page for the choice of the Payment Method of your Shop');
define('MODULE_PAYMENT_MERCAWAY_UPDATE_TITLE', 'Activate the automated adding/update of your Items in the Mercaway database');
define('MODULE_PAYMENT_MERCAWAY_UPDATE_DESCRIPTION', 'This option is mandatory in the case you didn\'t add/update your Items in the Mercaway Backoffice');
define('MODULE_PAYMENT_MERCAWAY_ACCEPTED','Payment accepted');
define('MODULE_PAYMENT_MERCAWAY_DECLINED','Payment rejected');
define('MODULE_PAYMENT_MERCAWAY_STATUS_OK_TITLE','Status for a Payment accepted');
define('MODULE_PAYMENT_MERCAWAY_STATUS_KO_TITLE','Status for a Payment rejected');
define('MODULE_PAYMENT_MERCAWAY_STATUS_OK_DESCRIPTION','Select the Order Status by default for a Payment accepted via the Mercaway Payment Module');
define('MODULE_PAYMENT_MERCAWAY_STATUS_KO_DESCRIPTION','Select the Order Status by default for a Payment rejected via the Mercaway Payment Module');
?>
-----------
3.
Technical Documentation:
Contribution Installation for osCommerce MS2
Ressources:
- API of the Payment Module (api/mercaway.php)
- Translation of the module in French (lang /fr/mercaway.php)
- Translation of the module in English (lang /en/mercaway.php)
In the Mercaway Backoffice, please do to “My Shop / My Account”:
Edit the following fields:
Website Address
Domain Name of your Online Shop. If you integrate the Mercaway Payment Module, it is the URL address u
for the sending of the data to Mercaway.
Security Key for the Payment Module
Security Key used during the Mercaway Payment Module integration. After each password modification, the
Security Key is changed. It is recommended to modify it regularly.
Return URL for the data after the Order
When an Order is done via the Mercaway Payment Module, information depending on the validity of the Cre
Card is sent to the URL address.
Example:
http://www.maboutique.com/checkout_process.php Redirect URL after the Order (Accepted)
In the case of the Payment Module use, when the Order is terminated and Accepted on Mercaway, the Clie
redirected to this URL address.
Example:
http://www.maboutique.com/checkout_success.php Redirect URL after the Order (Declined)
In the case of the Payment Module use, when the Order is terminated and Declined on Mercaway, the Clien
redirected to this URL address.
If you do not fill out this field, the Client will be redirected to the Mercaway page indicating the Rejection of t
Payment and offering the possibility to try again.
Important
Security Systems have been installed to warn you against any hacking attempt. Thus you have to do your
integration directly from the Shop URL address indicated in the Backoffice. The integration of the Payment
Module will not work if you do it from another URL address (eg: localhost).
Communication with the Payment Module
1) Files Installation
o Place the file api/mercaway.php in /includes/modules/payment/
o Place the file lang/fr/mercaway.php in /includes/languages/french/modules/payment/
o Place the file lang /en/mercaway.php in /includes/languages/english/modules/payment/
2) Module Installation
o Go to the osCommerce Shop Backoffice then in « Modules / Payment »
o Click on the Payment Module « Mercaway » then « install »
o Modify the by default values with yours by reading the descriptions for each field
3) Module Test
o Make a Test Order with your osCommerce Shop and check that everything works properly (Credit Card number for the tests: 4978000000000000)
4) Customization of the payment Validation / Decline page
o Once the Order is terminated, the Customer is automatically redirected to a URL address of your choice. You must consequently create a page to announce to the Customer his Order has been validated or not.
Description of the errors
Code Reason
#0000 One or several variable(s) is / are missing.
#0001 The calling URL address has a different value of the
variable « site ».
#0002 The website is not registered on Mercaway. Check the
URL address of the website given in the Backoffice.
#0003 The Security Key is wrong.
#0004 One of the ordered Item References doesn’t exist in
the Mercaway Items Database and it cannot be
created automatically with the send information (Case
2). A detailed email is sent to the Shop.
#0005 et #0006 Internal error, please contact our Mercaway technical contact
[вложение удалено Администратором]
[вложение удалено Администратором]