### Install Solidgate SDK for Go Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form Installs the Solidgate SDK for Go using the go get command. This allows developers to integrate Solidgate's payment functionalities into their Go applications. ```go go get github.com/solidgate-tech/go-sdk ``` -------------------------------- ### SDK Integration Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form Instructions and code examples for installing and initializing the Solidgate SDK in various programming languages (PHP, Node.js, Go, Kotlin, Python). ```APIDOC ## SDK Integration ### Description This section provides guidance on integrating the Solidgate SDK into your project. It covers installation steps for different languages and how to initialize the SDK with your API credentials. ### Step 1. Install SDK #### PHP ```bash composer require solidgate/php-sdk ``` #### Node.js ```bash npm install @solidgate/node-sdk ``` #### Go ```bash go get github.com/solidgate-tech/go-sdk ``` #### Python ```bash pip3 install solidgate-card-sdk ``` ### Step 2. Create SDK Instance #### PHP ```php ", signature: "<-your data->", paymentIntent: "<-your data->", }, paypalButtonParams: { enabled: true, color: "blue", shape: "rect", label: "checkout", height: 52 } }; let form = PaymentFormSdk.init(data); ``` -------------------------------- ### Install Solidgate Module for Magento 2 Source: https://docs.solidgate.com/payments/integrate/ecommerce-platforms/magento Commands to copy, enable, compile, and verify the installation of the Solidgate Payment Module in a Magento 2 environment. ```bash cp -r Solidgate /path/to/magento/app/code/ php bin/magento cache:clean php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush php bin/magento module:status Solidgate_Payment/ ``` -------------------------------- ### Customize Bizum Button Container Source: https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons This example illustrates how to customize the position of the Bizum button by specifying a `div` element using its ID in the `containerId` parameter of `bizumButtonParams`. If no `containerId` is provided, the button appears above the form fields. ```javascript
``` -------------------------------- ### Create Solidgate API Instance in Go Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form Initializes the Solidgate API client in Go, passing your public and secret keys. This client is necessary for performing operations through the Solidgate API. ```go solidgateSdk := solidgate.NewSolidGateApi("public_key", "secret_key") ``` -------------------------------- ### Form Initialization and Configuration Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form This section details how to initialize the Solidgate Payment Form with various configuration options and styling. ```APIDOC ## Form Initialization and Configuration ### Description This section details how to initialize the Solidgate Payment Form with various configuration options and styling. ### Parameters #### Query Parameters - **containerId** (string) - Optional - Custom `containerId` to place the form. If not set, it is displayed in the element with id `solid-payment-form-container`. ### Request Body Example ```json { "merchantData": { "merchant": "api_pk_7b197...ba108f842", "signature": "MjliMzU4ODE3ZDVlM2E1YWZmYzI1NmU4MzU3YjhlODRkMTJmZTk1NjIxOWNiYzFmNDk0N2NkNjk5YTA5Y2Q4NzIzOWIwMTgxZTQwOGExZjFmYWQ1NzQyYjc3ZGRjMzE0MTczYTQ2OGEyMTlmNGI4YzA5ZmNhMTczZDI0ZDBkZmM=", "paymentIntent": "E5FKjxw5vRjjIZBKtH_Q9oN1Wmn5icMn720prO4nPB3cYpzC9wLAHwq9IwstmD-YFLFPsdq2Rk9YzRJhxdPEq2KI19fFt1QotX-smH5_xWxGfYcvrf2Y4v4KWgbjzJylHTDM6eCXVvbdZyVU54vD3sxntN3gFiyuhEzMn8mKoDV0UdIqLN_VsTAdehBUrqk7aPNzXCfSqpy9pCBlpdFNCfgOyHoDXGGS_Z9fK3gCw7usF2v0IU96mQGzdtyEUs1Z2MJYwle7sjEkWNEb9SkpW1zUXEZCFMF8Cu-dn6fWe4cVE2Ok1MDeTE43dySgw9e8GzMxgPmG2YFjg5xcvuedQ==" }, "formParams": { "buttonType": "default", "submitButtonText": "Pay", "isCardHolderVisible": true, "hideCvvNumbers": true, "headerText": "Enter your debit or credit card details (from merchant)", "titleText": "Card info (from merchant)", "formTypeClass": "default", "googleFontLink": "//fonts.googleapis.com/css2?family=DM+Sans:ital@1&display=swap", "autoFocus": false }, "styles": { "submit_button": { "background-color": "red", "font-size": "16px", "font-weight": "bold", "": { "background-color": "green" }, "form_body": { "font-family": "DM Sans" } } } } ``` ``` -------------------------------- ### Handling Verify Event in Angular Source: https://docs.solidgate.com/payments/integrate/payment-form/form-events Provides an example of integrating the Solidgate Angular SDK to respond to the 'verify' event. The `(verify)` output event binding on the `ngx-solid-payment` component triggers the `onVerify` method for custom event handling. Requires component setup and import of SDK types. ```typescript import {Component} from '@angular/core'; import {InitConfig, SdkMessage, MessageType} from "@solidgate/angular-sdk"; @Component({ selector: 'app-root', template: ' ' }) export class AppComponent { merchantData: InitConfig['merchantData'] = { merchant: '<<--YOUR MERCHANT ID-->>', signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>', paymentIntent: '<<--YOUR PAYMENT INTENT-->>' } onVerify(event: SdkMessage[MessageType.Verify]): void { // here your logic } } ``` -------------------------------- ### Create Solidgate API Instance in Kotlin Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form Sets up the Solidgate API client in Kotlin using an HttpClient and Credentials object containing your public and secret keys. This client handles API interactions. ```kotlin val api = Api(HttpClient(), Credentials("public_key", "secret_key")) ``` -------------------------------- ### Free Trial with Auth-Void Process Source: https://docs.solidgate.com/billing/subscription-overview Implement free trials using the auth-void process. This involves a temporary $1 authorization followed by an immediate void, verifying the payment method. ```APIDOC ## POST /api/payments/auth_void ### Description Executes the auth-void process for free trials. A temporary $1 authorization is made and then voided. Applicable for specific payment APIs. ### Method POST ### Endpoint /api/payments/auth_void ### Parameters #### Request Body - **product_id** (string) - Required - The ID of the trial product. - **customer_account_id** (string) - Required - The ID of the customer's account. - **amount** (integer) - Required - Set to 1 for the authorization step. - **currency** (string) - Required - Set to 'USD'. ### Request Example ```json { "product_id": "prod_trial_456", "customer_account_id": "cust_fghij", "amount": 1, "currency": "USD" } ``` ### Response #### Success Response (200) - **order_status** (string) - The status of the order, expected to be 'void_ok' for successful auth-void. - **authorization_status** (string) - Status of the authorization transaction. - **void_status** (string) - Status of the void transaction. #### Response Example ```json { "order_status": "void_ok", "authorization_status": "authorized", "void_status": "voided" } ``` ``` -------------------------------- ### Create Subscription Source: https://docs.solidgate.com/billing/subscription-overview Initiate a subscription for a customer by providing a product ID and customer account ID. The system handles payment processing and subscription initialization. ```APIDOC ## POST /api/subscriptions ### Description Initiates a subscription for a customer. Requires a `product_id` and `customer_account_id`. ### Method POST ### Endpoint /api/subscriptions ### Parameters #### Request Body - **product_id** (string) - Required - The ID of the product to subscribe to. - **customer_account_id** (string) - Required - The ID of the customer's account. ### Request Example ```json { "product_id": "prod_12345", "customer_account_id": "cust_abcde" } ``` ### Response #### Success Response (200) - **subscription_id** (string) - The ID of the created subscription. - **notification** (string) - A notification message regarding subscription creation. #### Response Example ```json { "subscription_id": "sub_zyxw987", "notification": "Subscription created successfully." } ``` ``` -------------------------------- ### Create Solidgate API Instance in PHP Source: https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form Initializes the Solidgate API client in PHP by providing your public and secret keys. This instance is used for making subsequent API requests. ```php { try { const form = await PaymentFormSdk.resign(resignRequest, formConfig); // Now you can call payment form methods such as form.on, form.submit and more... } catch (error) { // Error will be thrown if payment form initialization fails. // You can handle it here. } }; ``` -------------------------------- ### Apple Pay Properties Source: https://docs.solidgate.com/payments/integrate/payment-form/apple-pay-button Details on the `apple_pay_merchant_domain` property and how it's automatically configured. ```APIDOC ## Apple Pay Properties ### `apple_pay_merchant_domain` * **Type**: string * **Description**: Domain where you have uploaded the domain-verification file. This is automatically configured from the internal database. * **Example**: `solidgate.com` ```