Where to get scid yandex cash. Testing payments. Online checkout connection

Yandex.Kassa is a popular service for accepting online payments; it allows you to accept bank cards, electronic money, cash, and more.

To enable a module, go to your site's control panel and in the top menu select Modules →
Module Management → Sales - - Enable.

After installation, the module will appear in the Modules → Yandex.Checkout menu.

How to connect to Yandex.Checkout?

  1. Submit an application for connection via the link and get access to your personal account.
  2. Fill in the form.
  3. Select a method for connecting the API.
  4. Sign the contract.

Technical data required for registration and connection to Yandex.Checkout

In your Yandex.Checkout personal account, open Settings / Store, specify URL for notifications https: // site_name/phpshop/modules/yandexkassa/payment/check.php

The Secret key field must be copied from your Yandex.Checkout personal account (Settings / API Keys, Secret Key).

The ShopID field must be copied from the Yandex.Checkout personal account (Settings / Shop, shopId).

In the "Payment on status" setting, select the order status, in which the user will be able to pay for the order using this method. If the "New order" status is selected, the user will be able to pay for the order immediately after registration. The message specified in the "Payment description" field is displayed after placing an order in the case when the order status does not match the status specified in the "Payment on status" setting.

Delivery setup

The VAT rate parameter for shipping can be configured in the shipping edit card.

Design templates

Template for displaying information about the payment system after registration: /phpshop/modules/yandexkassa/templates/payment_forma.tpl
Successful payment message template: /phpshop/modules/yandexkassa/templates/success_forma.tpl
Successful payment message template: /phpshop/modules/yandexkassa/templates/fail_forma.tpl

Starting from version 6.0.1, the Yandex.Checkout module uses the API of the new version; you must replace the Secret Key in the module settings. It must be copied from your Yandex.Checkout personal account (Settings / API Keys, Secret Key). You need to contact the Yandex.Checkout manager and ask to change the protocol to the Yandex.Checkout API. In the same message to the manager, you can inform that for a new protocol you need to set a URL for notifications: https: // site_name/phpshop/modules/yandexkassa/payment/check.php

Why do you need Yandex.Checkout?

Connecting the site to this payment service allows you to use the most popular methods for paying for orders by your customers. According to some estimates, there are about 70 million users in the Russian segment of the Internet, more than 20% of them use Yandex.Money to pay for services, and the remaining 80% pay by credit card, through terminals or in cash. Connecting to the Yandex.Checkout payment service will allow you to accept for payment:

Payment methods will also be available ( some payment methods are available only after agreement with the payment service manager!):

  • Selecting the type of payment on the Yandex.Checkout side, the client will choose the most convenient method from those available to you.
  • From the user's Yandex.Money account or from a bank card added to an electronic wallet
  • From any bank card that is not added to the user's wallet in Yandex.Money
  • Through the terminal for accepting payments
  • From mobile phone account
  • Payment from a wallet in the WebMoney system
  • Payment via Sberbank: payment by SMS or Sberbank Online
  • Payment via mobile terminal (mPOS)
  • Payment via Alfa-Click
  • Pay in installments
  • QIWI Wallet

!!! At the moment, the integration is implemented through the Yandex widget, which only involves payment by card or through Sberbank / Internet Bank

Connecting to Yandex.Checkout

Important! This payment method is available for use only if an agreement is concluded between your company and the Yandex.Kassa payment service!

Configuring the connection for accepting payments through the Yandex.Kassa electronic payment service consists of two main stages.

  1. Registration of a legal entity in Yandex.Checkout.
  2. Configuring a connection in Yandex.Checkout.
  3. Setting up a store connection in the Site Control Panel.

Let's go through in order and indicate all the necessary settings for these stages!

1. Registration of a legal entity in Yandex.Checkout

Fill out an application for connection according to instructions.

As a result, you will be taken to a page where you need to fill out a questionnaire:

2. Setting up a connection in Yandex.Checkout.

At this stage, you need to fill in the technical settings for the connection.

Select "Payment module", click "Continue".

Select "Your System" - ABCP from the list.

Enter Email to send registers and click "Save and continue"

Then release the secret key according to the instructions. In addition to the secret key (secretKey), you will also need the store ID in the Yandex.Checkout service (shopId). It can be viewed in the Yandex.Checkout LC in the settings section.

Important! Be sure to save the shopId and secretKey values \u200b\u200byou received in a safe place. We will need these parameters to configure the store connection on the side of the ABCP platform.

This completes the settings for connecting to the Yandex.Checkout payment service on the side of the Yandex.Checkout payment service, proceed to the settings on the side of the store created in the ABCP service.

3. Setting up the site in the Control Panel

This stage of setting up the payment system occurs in the PU of your site. AT PU -\u003e Settings -\u003e Finance -\u003e Payment systems settings you need to create a new set of settings. When creating, select a system Yandex.Checkout.
Parameters " Description"and" Status"fill in as recommended on the payment system description page.
In field "Counterparty ID (shopId)" Counterparty ID (shopId)
In field "Secret Key (secretKey)" - specify the parameter you received in the Yandex.Checkout account Counterparty's secret key (secretKey). If necessary, the key can be generated again according to the instructions.
Leave the "testShopId" and "testSecretKey" fields blank.
In field "Payment type" - specify the payment method that Yandex will offer the client to pay for the order. To use several types, create several separate Yandex.Checkout settings.
In field "Demo mode" - is responsible for the demo mode. In demo mode, you can pay for your order with demo rubles through a test account. Test account data must be requested separately. To switch the Yandex.Kassa PS to combat mode (or to test the payment on behalf of your client) and receive working credentials, select "No".
If you use the integration of Yandex.Checkout with an online cashier to fiscalize checks, then you need to activate the checkbox "Send data for checks:" and choose "Type of company taxation" and "Setting up VAT"that you indicated when activating the online checkout. Please select "Sign of the subject of calculation" and "Sign of the method of calculation"appropriate to your specifics.

3. Payment using Yandex.Checkout

After choosing this payment method, the client will be prompted to go to the Yandex.Money payment service website to make a payment.
After completing the payment, the client will be redirected back to your site. The Yandex.Kassa service notifies your site about the status of the payment using a special protocol at regular intervals. You can view the payment status on the page " Payment systems"in PU.

Please note that you have the opportunity to independently specify any additional text on the page to go to the Yandex.Checkout website for order payment. You can do this in the Control Panel, the Appearance and Content page, the Infoblocks tab, the symbolic code of the required information block paymentViaYandexMoney.

In this article, we will consider connecting the payment method "Yandex.Checkout" for an online store on ADVANTSHOP by " API", if you need to connect through the" Payment module "go to the instructions.

Preparing to connect a payment method

Attention

To connect the "Cash from Yandex.Money" payment method, you need to purchase an SSL certificate for the domain name of your store. ...

After the issue with the SSL certificate is resolved, let's move on to further settings.

Registration in the payment system

To get started, you need to submit and conclude an agreement with Yandex.Money.

Fill out the form on the website.
1. Select "API (for self-written sites)" (Fig. 1).
2. Enter email to send registers (fig.2)
3. Wait while the information is checked by Yandex.kassa employees (fig. 3)


Picture 1.


Figure 2.


Figure 3.

The note

When registering for the first time, please indicate, be sure to indicate that you want to connect the store using the "New API protocol".

After the personal account is created and the store is added, check your domain and the "API" protocol should be indicated (Fig. 4)


Figure 4.


Figure 5.


Figure 6.

After saving, wait (Fig. 7).


Figure 7.


Figure 8.

At the time of activation of the key, an SMS will be sent to the number indicated in the contract (not necessarily the number for the cash register account), after confirmation, the information will be displayed on the screen (Fig. 9) and the key is generated (Fig. 8).


Figure 9.

Setting up a payment method on the store side

After successful registration, go to the store settings, the menu item "Settings-\u003e Payment" (Fig. 10)


Figure 10.

On the page that opens, click "Add a payment method" and select the "Yandex.Checkout" module (Fig. 11)


Figure 11.

In the line "connection method" select "API" (Fig. 12)


Figure 12.

1. Specify shopId - take this number in your Yandex.kassy personal account and you should also be informed about it.

2. Specify the secret key - the parameter was created on the Yandex.Checkout side (Fig. 8.9).

3. Select your preferred payment method from the list, or you can select "smart payment", then at the time of payment all possible payment methods from Yandex.Checkout will be available.

4. If you want to transfer fiscal data to the cloud cashier through Yandex.Checkout, check the "Send data for check" box. More details

Then, activate the payment method by ticking the " Active", and save the changes by clicking the" Save" at the bottom of the page.

Also, if necessary, indicate your VAT rate from the drop-down list.

This completes the setup of the method.

Checking. Testing payments

Attention

You register the combat settings immediately, so you make a test payment on a product with a nominal value, for example, 10 rubles. That is, you create a product worth 10 rubles. and pay immediately.

Everything is ready.

Download the store launch checklist

Register an account there.

STEP-2: Setting

2.1

Attention! according to the Yandex.Checkout rules, your site must be under the SSL protocol, that is, it must be opened by a link starting with https: //.

If you do not have an SSL protocol, then you need to connect it (for advice, contact the hoster's technical support).

Go to the "Store Settings" tab

Copy the shopId parameters and transfer them to the module settings

You should receive a letter from Yandex.Checkout

Copy the scid parameter from there and transfer it to the module settings
Attention! The scid parameter in demo mode is different from the working scid.
Therefore, for testing, use the scid from the letter.

Save shopId and scid in module settings

2.2

Copy AvisoURL or checkURL in the module settings - there is the same value. Open it in a browser and make sure that the link does not lead to a redirect. Example: redirect from WWW to non-WWW. If the link leads to a redirect, then change the link so that there is no redirect. The link should open a blank page in the browser.

Save it to AvisoURL or checkURL in Payment options

Select "Use success and error pages with dynamic URLs" - "ON"

Set shopPassword and save it in module settings

2.3

Assign two DIFFERENT status

STEP-3: Testing

3.1

For testing it is best to use the "Bank Cards" payment method. Therefore, add "Bank Cards" to the list of payment methods in the module settings.

Turn on "Debug mode" in the module settings

3.2

Go to checkout, put any product in the cart, place your order and go to payment from the created payment method (Bank cards).

First, a verification form will open, click on the button

A card payment form should open

Remember your order number

3.3

Go to the admin panel in Sales -\u003e Orders. And make sure that an order appears in the list of orders with the status you assigned at step 2.3 ("Order status after confirmation but before payment").

Open the letter from Yandex again and follow the link

Use your card details to pay for a test order

After successful payment of the order, go to the admin panel in Sales -\u003e Orders. And make sure that an order appears in the list of orders with the second assigned status at step 2.3 ("Order status after payment").

STEP-5: Working Mode

Contact Yandex.Checkout technical support with a request to enable the operating mode.

Disable "debug mode" in the module settings.

Assign the required payment methods in the first tab of the module settings.

Do not forget to change scid to the value from the Yandex-Cash register, instead of the value from the letter

If you were unable to integrate your store with the Yandex.Checkout service using this instruction, you can contact the module developer for technical support.

Contacts for communication are in the header of this site.

If you are connected according to the scheme Payment module or HTTP protocol, you can test your integration in the test store. When paying, everything goes as with real payments, but the money is not transferred anywhere. You can test payment in two ways: by credit card and from a Yandex.Money wallet.

The test store is available in your personal account, and you can select it by clicking the button All shops and payouts.

Important. If you did not find the test store in your personal account, you may have previously worked with the Yandex.Checkout demo environment. The demo environment is being decommissioned. Write to your manager to connect a test store.

Training

To test the payment, you will need the shopId and scid of your test store. They can be viewed in the test store settings in your account.

Payment verification using the CMS payment module

To test a payment in the settings of the Yandex.Checkout payment module:

    translate the module to work mode (if you turn on the test mode, the payment will not work);

    specify the shopId and scid of the test store.

You can find instructions for installing and configuring the payment module on the Checkout website, in the CMS, framework or CRM setup section, or ask the developers of your system.

Checking payment using a payment form

    Create an empty file with * .html extension.

    Copy the sample code of the payment form you need into it.

    Change the values \u200b\u200bof the shopId and scid parameters to the shopId and scid values \u200b\u200bof the test store.

    Save the file.

An example of a form with a choice of a payment method on a store website

> > Test payment form

Payment method:

Payment from any bank card

An example of a form with a choice of a payment method on the Yandex.Checkout side

Test payment form

Test payment

Step 1. Go to payment:

    If you are using the payment module, place an order in the same way as your customers will do, and proceed to payment.

    If you are using a payment form, open the html file in your browser, select a payment method and click Pay... The payment method is selected on the store website or on the Yandex.Checkout side (it depends on the payment scenario).

Step 3. If your store receives notifications via HTTP (connected according to the scheme HTTP protocol or Payment module), check that the order is marked as paid in your system.

Important. Do not give back an item that was paid for through a test store. To avoid overlaps, use a special URL for test notifications from Yandex.Checkout (you need to register it in the test store settings in your personal account).

Payment by credit card

Test bank cards

Real cards cannot be used in the test store. Instead, check your payment using the test cards below. Specify any date (but greater than the current one) as the expiration date, CVC and the code for passing 3-D Secure - any numbers.

Verifying Successful Scenarios

You can check payments with bank cards of different types.

room Card type
5555555555554477 MasterCard (with 3-D Secure)
5555555555554444 MasterCard
6759649826438453 Maestro
4111111111111111 Visa
4175001000000017 Visa Electron
370000000000002 American Express
3528000700000000 JCB
36700102000000 Diners club
room Card type
5555555555554477 MasterCard (with 3-D Secure)
5555555555554444 MasterCard
6759649826438453 Maestro
4111111111111111 Visa
4175001000000017 Visa Electron
370000000000002 American Express
3528000700000000 JCB
36700102000000 Diners club

Checking for unsuccessful scripts

Choose a test card based on the scenario you need.

Card number Reason for canceling payment
5555555555554592
5555555555554535
5555555555554543
5555555555554568

5555555555554634

5555555555554527
5555555555554600
5555555555554618
5555555555554626
5555555555554501
5555555555554576
5555555555554550
5555555555554584 configure restrictions
Card number Reason for canceling payment
5555555555554592 3-D Secure authentication failed. The buyer should repeat the payment, contact the bank for clarifications or use another means of payment
5555555555554535 Payment with this payment method was rejected for unknown reasons. The buyer should contact the organization that issued the means of payment
5555555555554543 The bank card has expired. Buyer should use a different payment method
5555555555554568

5555555555554634

The payment was blocked due to suspicion of fraud. Buyer should use a different payment method
5555555555554527 The reason is not detailed. The buyer should contact the initiator of the cancellation of the payment for details.
5555555555554600 There is not enough money to pay. The buyer should top up the balance or use another means of payment
5555555555554618 The card number is incorrect. The buyer should repeat the payment and enter the correct data
5555555555554626 Incorrect CVV2 code (CVC2, CID). The buyer should repeat the payment and enter the correct data
5555555555554501 The issuing organization is not available. The buyer should repeat the payment later or use another means of payment
5555555555554576 The payment limit has been reached for this payment method or your store. The buyer should repeat the payment the next day or use another means of payment
5555555555554550 Transactions with this means of payment are prohibited (for example, the card is blocked due to loss, the wallet is due to hacking by fraudsters). The buyer should contact the organization that issued the means of payment
5555555555554584 You cannot pay with a bank card issued in this country. The buyer should use another means of payment. You can set up restrictions on payments with foreign bank cards

Payment from a Yandex.Money wallet

To test payment from a Yandex.Money wallet no test wallet needed: In the test store, payments go through without the participation of a real wallet.

Important. Before paying, you need to log out of your wallet account in Yandex.Money.

Making real payments

For stores based on CMS or another ready-made system, change the shopId and scid to the real ones in the payment module settings and check that the module is in working mode.

If you do not use a payment module or another ready-made solution, in the payment form, replace the shopId and scid parameters with the real ones.