Loading...
Обучение/Помощь новичкам | Вордкасса или иксола
hacker2 (10.12.2014 в 21:24)
xsolla.com world-kassa.com

Зарегался в иксолле название проекта что нужно писать?
вот
Ап
Ап2
иксола
FAKIN, не важно если кх то колхоз или что то
Вот что это за коды и куда их нужно прописывать?
Step 1: Get Token

To integrate Payment UI into your game you should obtain an access token.

An access token is a string that identifies game, user and purchase parameters.

Request and response payloads are formatted as JSON. For security reasons all requests include the API Key parameter (available on Setting page in Xsolla Merchant Account) in HTTP header.

Getting token endpoint:

https://api.xsolla.com/merchant/merchants/{merchant_id}/token

In a HTTP POST request you can use parameters for Payment UI.

Example Request
curl -v https://api.xsolla.com/merchant/merchants/{merchant_id}/token \
-X POST \
-u your_merchant_id:merchant_api_key \
-H 'Content-Type:application/json' \
-H 'Accept: application/json' \
-d '
{
"user": {
"id": {
"value": "1234567",
"hidden": true
},
"email": {
"value": "support@xsolla.com"
},
"country": {
"value": "US",
"allow_modify": true
}
},
"settings": {
"project_id": 14004,
"language": "en",
"currency": "USD"
},
"purchase": {
"virtual_currency": {
"quantity": 100
},
"description": {
"value": "Test Purchase"
}
}
}'
Request Parameters
Name Type Description
user object Object with data about the user.
user.id object Object with data about the user ID. Required.
user.id.value string User ID.
user.id.hidden boolean Whether or not this element can be hidden on Payment UI.
user.email object Object with data about the user email.
user.email.value string User email.
user.country object Object with data about the user country.
user.country.value string User country. 2-letter definition of the country is used according to ISO 3166-1 alpha-2 standard.
user.country.allow_modify boolean Whether or not user can modify the field on Payment UI
settings object Object with custom project settings.
settings.project_id int Game identifier in Xsolla system. You can find it in Merchant Account. Required.
settings.language string Interface language. 2-letter language code according to ISO 639-1 standard.
settings.currency string Preferred payment currency. Three-letter definition of the currency is used according to ISO 4217.
purchase object Object with data about the purchase.
purchase.virtual_currency object Object with data about virtual currency.
purchase.virtual_currency.quantity float Quantity of the purchase in virtual currency.
purchase.description object Object with data about purchase description.
purchase.description.value string Description of the purchase. It is displayed in UI and in email receipts.
Full list of parameters you can find in full API Documentation.

Example Response
{
"token": "uV0iCEvWkUGVqWerTgbrndWePOMiLAfO"
}
Step 2: Integrate Payment UI (PayStation)

Once you get valid token you are ready to make a request to PayStation interface.

This endpoint requires valid token, created on the previous step:

https://secure.xsolla.com/paystation2/?access_token=PAYSTATION_TOKEN

Payment UI formats
There are different types of integration: on site in the iframe, in the pop-up window or in lightbox.

Code example of iframe implementation:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<iframe id="paystation"
src="https://secure.xsolla.com/paystation2/?access_token=PAYSTATION_TOKEN
width="100%" height="100%">
</iframe>
</body>
</html>
Step 3: Set Up Instant Payment Notification

Whenever a user completes the payment process, we send you an instant payment notification (IPN).

HTTP request is sent from our servers to your IPN listener script where we communicate to your server about user and payment details. So your server can process the IPN automatically and deliver the purchase to the user.

You can setup Payment notification URL in Xsolla Merchant Account.

Request and response payloads are formatted as JSON. For security reasons all requests include the Signature parameter in HTTP header.

To generate the signature we use SHA1 signature algorithm. JSON body from POST request plus Notification Token (a secret word that was specified for your game in Xsolla Merchant Account) will form the data that will be hashed. Please refer to full API Documentation for more information and examples.

User Validation Notification
The Xsolla server sends a request to your payment notification script to verify the existence of the character in the game.

Example Request
curl -v https://yourdomain.com/ \
-X POST \
-H 'Content-Type:application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '
{
"notification_type": "user_validation",
"user": {
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "support@xsolla.com",
"id": "1234567",
"country": "US"
}
}'
Request Parameters
Name Type Description
notification_type string Type of notifica
Step 1: Get Token

To integrate Payment UI into your game you should obtain an access token.

An access token is a string that identifies game, user and purchase parameters.

Request and response payloads are formatted as JSON. For security reasons all requests include the API Key parameter (available on Setting page in Xsolla Merchant Account) in HTTP header.

Getting token endpoint:

https://api.xsolla.com/merchant/merchants/{merchant_id}/token

In a HTTP POST request you can use parameters for Payment UI.

Example Request
curl -v https://api.xsolla.com/merchant/merchants/{merchant_id}/token \
-X POST \
-u your_merchant_id:merchant_api_key \
-H 'Content-Type:application/json' \
-H 'Accept: application/json' \
-d '
{
"user": {
"id": {
"value": "1234567",
"hidden": true
},
"email": {
"value": "support@xsolla.com"
},
"country": {
"value": "US",
"allow_modify": true
}
},
"settings": {
"project_id": 14004,
"language": "en",
"currency": "USD"
},
"purchase": {
"virtual_currency": {
"quantity": 100
},
"description": {
"value": "Test Purchase"
}
}
}'
Request Parameters
Name Type Description
user object Object with data about the user.
user.id object Object with data about the user ID. Required.
user.id.value string User ID.
user.id.hidden boolean Whether or not this element can be hidden on Payment UI.
user.email object Object with data about the user email.
user.email.value string User email.
user.country object Object with data about the user country.
user.country.value string User country. 2-letter definition of the country is used according to ISO 3166-1 alpha-2 standard.
user.country.allow_modify boolean Whether or not user can modify the field on Payment UI
settings object Object with custom project settings.
settings.project_id int Game identifier in Xsolla system. You can find it in Merchant Account. Required.
settings.language string Interface language. 2-letter language code according to ISO 639-1 standard.
settings.currency string Preferred payment currency. Three-letter definition of the currency is used according to ISO 4217.
purchase object Object with data about the purchase.
purchase.virtual_currency object Object with data about virtual currency.
purchase.virtual_currency.quantity float Quantity of the purchase in virtual currency.
purchase.description object Object with data about purchase description.
purchase.description.value string Description of the purchase. It is displayed in UI and in email receipts.
Full list of parameters you can find in full API Documentation.

Example Response
{
"token": "uV0iCEvWkUGVqWerTgbrndWePOMiLAfO"
}
Step 2: Integrate Payment UI (PayStation)

Once you get valid token you are ready to make a request to PayStation interface.

This endpoint requires valid token, created on the previous step:

https://secure.xsolla.com/paystation2/?access_token=PAYSTATION_TOKEN

Payment UI formats
There are different types of integration: on site in the iframe, in the pop-up window or in lightbox.

Code example of iframe implementation:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<iframe id="paystation"
src="https://secure.xsolla.com/paystation2/?access_token=PAYSTATION_TOKEN
width="100%" height="100%">
</iframe>
</body>
</html>
Step 3: Set Up Instant Payment Notification

Whenever a user completes the payment process, we send you an instant payment notification (IPN).

HTTP request is sent from our servers to your IPN listener script where we communicate to your server about user and payment details. So your server can process the IPN automatically and deliver the purchase to the user.

You can setup Payment notification URL in Xsolla Merchant Account.

Request and response payloads are formatted as JSON. For security reasons all requests include the Signature parameter in HTTP header.

To generate the signature we use SHA1 signature algorithm. JSON body from POST request plus Notification Token (a secret word that was specified for your game in Xsolla Merchant Account) will form the data that will be hashed. Please refer to full API Documentation for more information and examples.

User Validation Notification
The Xsolla server sends a request to your payment notification script to verify the existence of the character in the game.

Example Request
curl -v https://yourdomain.com/ \
-X POST \
-H 'Content-Type:application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '
{
"notification_type": "user_validation",
"user": {
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "support@xsolla.com",
"id": "1234567",
"country": "US"
}
}'
Request Parameters
Name Type Description
notification_type string Type of notification. Required.
user object Object with data abou
там их короч много.
Ап
Онлайн: 7
Время:
Gen. 0.108
(c) ByMAS.RU 2010-2025