ChargeService


Click here for a complete list of operations.

ChargeGetPaymentLink

از این متد برای ارسال شارژ بدون داشتن اعتبار استفاده میشود . بعد از بررسی اطلاعات ارسالی شما لینک پرداخت به اندازه مبلغ ارسالی شارژ ایجاد شده و کاربر درصورت پرداخت موفق شارژ را دریافت مینماید.

پارامتر ورودی شرح 
Username

نام کاربری وب سرویس

Passwordکلمه عبور
MobileNumberشماره تلفنی که میخواهید عملیات شارژ بر روی آن انجام گیرد
ServiceIdنوع سرویس را مشخص میکند که به ترتیب 1 شارژ مستقیم و 5 برای ارسال بسته استفاده میشود 1- شارژ اعتباری 2- شارژ دایمی 4- وایمکس 5- بسته اینترنتی
Amountمبلغ شارژ یا بسته
Paramsمشحض کننده پارامتر سرویس میباشد که اگر اپراتور ایرانسل باشد 4 به معنی شگفت انگیز . برای شارژ معمولی عدد صفر، برای اپراتور رایتل 3 به معنی شور انگیز میباشد و برای ارسال بسته کد بسته در این فسمت برای تمامی اپراتورها قرار میگیرد
RetUrlنتیجه بازگشت از بانک در این متغییر بر میگردد همچنین شما در این متغببر نتیجه ارسال شارژ را نیز دریافت مینمایید در آخر توضیحات نمونه آورده شده است
ExtOrderIDکد سفارش باید یک مقدار منحصر بفرد ارسال گردد

___________________________________________________

خروجی متد شامل موارد زیر میباشد

پارامتر خروجی شرح
ResultCodeکد عملیات
ResultCaption

شرح کد عملیات

Url

لینک پرداخت بانک

___________________________________________________

نتیجه پرداخت در متغیر RetUrl برمیگردد که شرح آن در زیر آورده شده است

پارامتر خروجی شرح
PaymentReferenceکد پیگیری پرداخت
TransactionReference

کد پیگیری شارژ

PaymentResult

کد نتیجه پرداخت بانک

PaymentResultMsg

شرح کد نتیجه پرداخت بانک

نمونه RetUrl

http://yourdomain?PaymentReference={0}&TransactionReference={1}&PaymentResult={2}&PaymentResultMsg={3}


Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /UserWebservice.asmx HTTP/1.1
Host: ws.toshanet.ir
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.toranjsoft.com/ChargeGetPaymentLink"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ChargeGetPaymentLink xmlns="http://www.toranjsoft.com">
      <Username>string</Username>
      <Password>string</Password>
      <MobileNumber>string</MobileNumber>
      <ServiceId>int</ServiceId>
      <Amount>int</Amount>
      <Params>string</Params>
      <RetUrl>string</RetUrl>
      <ExtOrderID>string</ExtOrderID>
    </ChargeGetPaymentLink>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ChargeGetPaymentLinkResponse xmlns="http://www.toranjsoft.com">
      <ChargeGetPaymentLinkResult>string</ChargeGetPaymentLinkResult>
    </ChargeGetPaymentLinkResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /UserWebservice.asmx HTTP/1.1
Host: ws.toshanet.ir
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <ChargeGetPaymentLink xmlns="http://www.toranjsoft.com">
      <Username>string</Username>
      <Password>string</Password>
      <MobileNumber>string</MobileNumber>
      <ServiceId>int</ServiceId>
      <Amount>int</Amount>
      <Params>string</Params>
      <RetUrl>string</RetUrl>
      <ExtOrderID>string</ExtOrderID>
    </ChargeGetPaymentLink>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <ChargeGetPaymentLinkResponse xmlns="http://www.toranjsoft.com">
      <ChargeGetPaymentLinkResult>string</ChargeGetPaymentLinkResult>
    </ChargeGetPaymentLinkResponse>
  </soap12:Body>
</soap12:Envelope>