1. Payment
<Quantum> Milf Master
  • API
  • General Information
    • Change Log
    • Server Structure
  • Integration Service
    • 1. Version History
    • 2. Introduction
    • 3. Launching MilfMasters Game Client
    • 4. Wallet API
    • Verify Session
      POST
    • Get Balance
      POST
    • Withdraw
      POST
    • Confirm Withdraw
      POST
    • Rollback Withdraw
      POST
  • Entry Point
    • Entry Sequence
    • Entry Point
  • Payment
    • Payment Sequence
    • Payment Initiation
    • Payment Callback
    • Payment Callback API
      POST
    • Query Withdrawal
      POST
  • Data Types
    • Data Types
  • Schemas
    • Error Response Body
    • Balance Amount
  1. Payment

Payment Initiation

When a player needs to buy a certain item in game, the client will call the javascript function in the game page. The game page (usually a iframe) which contains the game client will post a message to its parent.

Post message from client#

Parameters in {opt}#

PARAMETERTYPEREQUIREDDESCRIPTION
serverIdnumbertrueGame Server ID
cpOrderIdstringtrueOrder ID from the content provider
productIdstringtrueProdcut ID in game
productNamestringfalseProdcut name in game
productDescstringfalseProdcut description in game
productNumbernumberfalseProduct number, default is 1
productPricenumbertrueProduct price
extParamsstringtrueAny extra parameters in string

Parent event#

When the event is received by the parent of the iframe, it can be parsed according to the parameters passed, either popping up a payment window or redirect to the payment page.
There is an example in 2cy.games:
image.png
Modified at 2023-04-25 05:43:20
Previous
Payment Sequence
Next
Payment Callback
Built with