GithubHelp home page GithubHelp logo

momo-wallet / payment Goto Github PK

View Code? Open in Web Editor NEW
179.0 26.0 115.0 4.81 MB

MoMo Payment

Home Page: https://momo.vn

C# 1.27% Ruby 0.41% JavaScript 92.71% Python 0.36% Go 0.74% PHP 3.68% PowerShell 0.01% Less 0.41% SCSS 0.41%
momo payment e-wallet mservice vidientu

payment's Introduction

MoMo - Payment Platform

Example code to integrate MoMo E-Wallet as payment method

  • Online Payment: Desktop, Mobile website
  • Offline payment: POS, Static QR, Dynamic QR
  • Mobile Payment: App to App, In MoMo Application

Documention

https://developers.momo.vn

Acknowledgments

Security Aalgorithms

More

Languages

  • Java - SDK already
  • PHP - SDK already
  • C#
  • Ruby
  • Python
  • NodeJs

Versioning

Version 1.0.2

License

(c) MoMo

Support

If you have any issues when integrate MoMo API, please find out in F.A.Q or Exception handling section in our documention

payment's People

Contributors

anhpham2 avatar hainguyenp207 avatar khangdc2 avatar lesang999 avatar lesangdeveloper avatar nhatnguyen43 avatar p2pmomo avatar vanhungpc avatar yuuyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

payment's Issues

Không có library cho java luôn ạ ?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Feature requesthttps://github.com/momo-wallet/payment/issues/2

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Giải mã hash thất bại

Em có tạo curl và copy body theo đúng trên docs này https://business.momo.vn/assets//docs/api/MoMo-Payment-APIs-v2.1.5.pdf?version=16 tích hợp app in app mà vẫn nhận được response là giải mã hash thất bại ? em đang không hiểu lỗi gì, mong anh chị giải đáp ạ. e cảm ơn

curl --location --request POST 'https://test-payment.momo.vn/pay/app'
--header 'Content-Type: application/json'
--data-raw '{
"customerNumber": "0966787273",
"partnerCode": "MOMOIQA420180417",
"partnerRefId": "Merchant123556666",
"appData": "v2/qml0PbOlrBYjFlZvXwRWjoMpmFmvqStTJt4DCXfE0cgMtyH5Akv+FxL2Nu8lDmxt0P3Mu+YeCGB+UFfwXICo7D07jR6f2VhauglozphNgkK7724sO3qVKC9ZI8KCdr0k4AHuuUNF4AT6Iy2rOmaCVF1WeyS/y/n2E4DArwaHG2J+8StiawfZPiKoUGvywNHV",
"hash": "A7WFmmnpn6TRX42Akh/iC5DdU5hhBT9LR5QSG6rJAl70hfEkkGUx2pTCai8s+M9KMVUcJ7m52iv74yhmeEjjN10TtEJoqITBIYBG2bqcTprhDijyhV4ePU7ytDNuLxzzIvGfTYyvbsEJ2jZTSf556yod12vhYqOJSFL/U2hVuxjUahf5Rnu5R/OLalg8QmlU6nQooEuNdzEXPMd6j9EaxOCiB2oM5/9QiTN0tCNSTIVvPtnlHu5mIbBHChcwfToIL4IAiD1nbrlDuBX//CZcrZj6hFqjvU31yb/DuG02c3aqWxbZKZ8csOwF9bL30m/yGr/0BQUWgunpDPrmCosf9A==",
"description": "Thanh toan cho don hang Merchant123556666qua MoMo",
"version": 2.0
}'

NodeJS - Giải mã hash thất bại

Mình đang tích hợp App in App momo cho dự án thì gặp vấn đề "Giải mã hash thất bại". Mình đã sử dụng code mẫu của momo trên github nhưng vẫn bị lỗi này. Mình không viết mình có sai chỗ nào không, mong mọi người giải đáp giúp với a. Cảm ơn mọi người đã quan tâm đến vấn đề này.

[
image
image
image

](url)

Error when use accesskey from test env

Hey everyone, I'm working with momo in test env but i have a problem
My code (the info i get from momo account test they provided):

var partnerCode = "MOMOIQA420180417";
var accessKey = "SvDmj2cOTYZmQQ3H";
var secretkey = "PPuDXq1KowPT1ftR8DvlQTHhC03aul17";
var requestId = partnerCode + new Date().getTime();
var orderId = requestId;
var orderInfo = "Thanh toán qua ví MoMo";
var redirectUrl = "https://momo.vn/return";
var ipnUrl = "https://callback.url/notify";
// var ipnUrl = redirectUrl = "https://webhook.site/454e7b77-f177-4ece-8236-ddf1c26ba7f8";
var amount = "50000";
var requestType = "captureWallet"
var extraData = ""; //pass empty value if your merchant does not have stores

//before sign HMAC SHA256 with format
//accessKey=$accessKey&amount=$amount&extraData=$extraData&ipnUrl=$ipnUrl&orderId=$orderId&orderInfo=$orderInfo&partnerCode=$partnerCode&redirectUrl=$redirectUrl&requestId=$requestId&requestType=$requestType
var rawSignature = "accessKey="+accessKey+"&amount=" + amount+"&extraData=" + extraData+"&ipnUrl=" + ipnUrl+"&orderId=" + orderId+"&orderInfo=" + orderInfo+"&partnerCode=" + partnerCode +"&redirectUrl=" + redirectUrl+"&requestId=" + requestId+"&requestType=" + requestType
//puts raw signature
console.log("--------------------RAW SIGNATURE----------------")
console.log(rawSignature)
//signature
const crypto = require('crypto');
var signature = crypto.createHmac('sha256', secretkey)
    .update(rawSignature)
    .digest('hex');
console.log(signature)

//json object send to MoMo endpoint
const requestBody = JSON.stringify({
    partnerCode : partnerCode,
    accessKey : accessKey,
    requestId : requestId,
    amount : amount,
    orderId : orderId,
    orderInfo : orderInfo,
    redirectUrl : redirectUrl,
    ipnUrl : ipnUrl,
    extraData : extraData,
    requestType : requestType,
    signature : signature,
    lang: 'en'
});
//Create the HTTPS objects
const https = require('https');
const options = {
    hostname: 'test-payment.momo.vn',
    port: 443,
    path: '/v2/gateway/api/create',
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Content-Length': Buffer.byteLength(requestBody)
    }
}
//Send the request and get the response
const req = https.request(options, res => {
    console.log(`Status: ${res.statusCode}`);
    console.log(`Headers: ${JSON.stringify(res.headers)}`);
    res.setEncoding('utf8');
    res.on('data', (body) => {
        console.log('Body: ');
        console.log(body);
        console.log('payUrl: ');
        console.log(JSON.parse(body).payUrl);
    });
    res.on('end', () => {
        console.log('No more data in response.');
    });
})

req.on('error', (e) => {
    console.log(`problem with request: ${e.message}`);
});
// write data to request body
console.log("Sending....")
req.write(requestBody);
req.end();

Response:

accessKey=SvDmj2cOTYZmQQ3H&amount=50000&extraData=&ipnUrl=https://callback.url/notify&orderId=MOMOIQA4201804171636971265214&orderInfo=Thanh toán qua ví MoMo&partnerCode=MOMOIQA420180417&redirectUrl=https://momo.vn/return&requestId=MOMOIQA4201804171636971265214&requestType=captureWallet
7f08bd28142116610de927c4bd29d56289f4765804189e03d9017428d5986aa3
Sending....
Status: 400
Headers: {"server":"nginx","date":"Mon, 15 Nov 2021 10:14:25 GMT","content-type":"application/json","transfer-encoding":"chunked","connection":"close","x-content-type-options":"nosniff","x-xss-protection":"1; mode=block","pragma":"no-cache","x-kong-upstream-latency":"7","x-kong-proxy-latency":"0","via":"kong/0.14.1"}
Body: 
{"responseTime":1636971265425,"message":"Bad format request.","resultCode":20,"subErrors":[{"field":"signature","message":"Invalid signature. Check raw signature before signed. Raw data before hash: accessKey=*****&amount=50000&extraData=&ipnUrl=https://callback.url/notify&orderId=MOMOIQA4201804171636971265214&orderInfo=Thanh toán qua ví MoMo&partnerCode=MOMOIQA420180417&redirectUrl=https://momo.vn/return&requestId=MOMOIQA4201804171636971265214&requestType=captureWallet."}]}
payUrl: 
undefined
No more data in response.

The account info:
Screenshot from 2021-11-15 17-14-54

When i change access key from test env to access key of production env:
Screenshot from 2021-11-15 17-19-44

Response work fine:

accessKey=Q8gbQHeDesB2Xs0t&amount=50000&extraData=&ipnUrl=https://callback.url/notify&orderId=MOMOIQA4201804171636971639731&orderInfo=Thanh toán qua ví MoMo&partnerCode=MOMOIQA420180417&redirectUrl=https://momo.vn/return&requestId=MOMOIQA4201804171636971639731&requestType=captureWallet
289b90b29913d4a8f74f1cff7070ef720432603e3f488201b21bd445785a9c51
Sending....
Status: 200
Headers: {"server":"nginx","date":"Mon, 15 Nov 2021 10:20:39 GMT","content-type":"application/json","transfer-encoding":"chunked","connection":"close","vary":"Accept-Encoding","x-content-type-options":"nosniff","x-xss-protection":"1; mode=block","pragma":"no-cache","x-kong-upstream-latency":"35","x-kong-proxy-latency":"1","via":"kong/0.14.1","strict-transport-security":"max-age=15768000"}
Body: 
{"partnerCode":"MOMOIQA420180417","orderId":"MOMOIQA4201804171636971639731","requestId":"MOMOIQA4201804171636971639731","amount":50000,"responseTime":1636971639947,"message":"Successful.","resultCode":0,"payUrl":"https://test-payment.momo.vn/v2/gateway/pay?t=TU9NT0lRQTQyMDE4MDQxN3xNT01PSVFBNDIwMTgwNDE3MTYzNjk3MTYzOTczMQ==","deeplink":"momo://?action=payWithAppToken&amount=50000&cardId=&cardType=&cashInId=&cashInIdPay=&comment=&createdAt=1636971639946&deeplinkCallback=&description=Thanh+to%C3%A1n+qua+v%C3%AD+MoMo&discountCampaignAmount=0&discountCode=&extra=&extraData=&extras=&gatewayMerchantCode=MOMOIQA420180417&gatewaySessionId=TU9NT0lRQTQyMDE4MDQxN3xNT01PSVFBNDIwMTgwNDE3MTYzNjk3MTYzOTczMQ==&gatewayVersion=3.0&giftIds=&isScanQR=false&language=en&merchantcode=MOMOIQA420180417&merchantname=MoMoTest&merchantnamelabel=Nh%C3%A0+cung+c%E1%BA%A5p&moneylimitPerTrans=&orderId=MOMOIQA4201804171636971639731&orderLabel=M%C3%A3+%C4%91%C6%A1n+h%C3%A0ng&partnerCode=MOMOIQA420180417&partnerName=MoMoTest&pin=&prepaidIds=&requestId=MOMOIQA4201804171636971639731&requestType=payment&serviceType=app&signature=5c2df0dad71d8cec8737a2a9103bd4b3a6a8775d7d172d1fc3971dd2414ac62f&storeId=MOMOIQA420180417&storeName=MoMoTest&type=&urlSubmitToken=https%3A%2F%2Fmomo.vn&callBackUrl=https%3A%2F%2Fmomo.vn%2Freturn&deeplinkCallback=https%3A%2F%2Fmomo.vn%2Freturn","qrCodeUrl":"https://test-payment.momo.vn/v2/gateway/app?isScanQr=true&t=TU9NT0lRQTQyMDE4MDQxN3xNT01PSVFBNDIwMTgwNDE3MTYzNjk3MTYzOTczMQ=="}
payUrl: 
https://test-payment.momo.vn/v2/gateway/pay?t=TU9NT0lRQTQyMDE4MDQxN3xNT01PSVFBNDIwMTgwNDE3MTYzNjk3MTYzOTczMQ==
No more data in response.

On Localhost server --- fatal error displayed

Describe the bug

A calll to an undefined function curl_int() on MOMO.php on line 5

To Reproduce
Steps to reproduce the behavior:

  1. copy and paste the php folder among the projects of wamp/www
  2. open the project(PHP) from the browser .ie localhost
  3. click MOMO.php
  4. See error

Expected behavior
SEE THE INTERFACE.

Screenshots
Capture

Desktop (please complete the following information):

  • OS:WINDOWS7
  • BrowserMOZILLA
  • Version NOT SURE

Additional context
programs with the function curl_int() normally dont run on my wamp. i am using wampserver 2.1

Momo AIO refund with Permission denied , can you help me!

{
"partnerCode": "MOMOLBJQ20200310",
"accessKey": "Ka33SrzzWEayk5wJ",
"requestId": "201648",
"amount": "10000",
"orderId": "R201648",
"transId": "475799475935",
"requestType": "refundMoMoWallet",
"errorCode": 78,
"message": "Permission denied",
"localMessage": "Không có quyền truy cập.",
"signature": "d12dd7b223a6118d3bc1e1f8c339b3d5db14c5602fc067d74c675359ed4b4494"
}

Otp

0385737313

IPN not working after payment success

Describe the bug
This is my config

def create_momo_payment(data):
    # https://github.com/momo-wallet/payment/blob/master/python/MoMo.py
    endpoint = "https://test-payment.momo.vn/v2/gateway/api/create"
    redirectUrl = "http://localhost:5001/preview_ticket/" + str(data.get("u_id"))
    ipnUrl = "http://localhost:5001/api/webhook"
    ....

Read the document in , I think when payment successfully, website will auto redirect and send a request to http://localhost:5001/api/webhook. Redirect working, but IPN not. I just define route with POST method and waiting. What I should do next?

How to Back end listen to IPN response

Mình đang tích hợp thanh toán momo cho dự án, hiện đã thanh toán thành công và redirect sang urlRedirect. Nhưng hiện tại mình đang không biết xử lý ipnUrl làm sao server có thể nhận được request để update vào database
Mình đang dùng .net 6 để làm server

Mong nhận được sự giúp đỡ, cảm ơn mọi người đã quan tâm

[golang] Generate RSA hash string - giải mã hash thất bại

Describe the bug
Xử lý thanh toán App-In-App, gọi POST https://test-payment.momo.vn/pay/app để kiểm tra transaction.

Sử dụng code mẫu generate RSA string ở https://github.com/momo-wallet/payment/blob/master/golang/src/MoMo/MoMo.go

Thay pubkey bằng key ở business.momo.vn

Nhận được về lỗi
{"status":153,"message":"Giải mã hash thất bại"}

Expected behavior
Check transaction thành công

Screenshots
Screen Shot 2019-05-02 at 11 19 32 AM

Screen Shot 2019-05-02 at 11 19 58 AM

Momo items not working

i try to use items field when call API, but it is not working in momo sandbox. It didn't show my list of items.

C# SDK postdata is missing field `extraData`

Describe the bug
Within C# SDK:

  • Hardcoded value of Secret Key.
  • Missing JSON post fields.

To Reproduce
Steps to reproduce the behavior:
Following the C# SDK, you will see the JObject message is missing extraData property that will lead to "Invalid signature" error.

Expected behavior
The C# SDK should be updated with correct example

Additional context
There are some uncommon rules with the signature generator. All params should be sorted in alphabet order, that will help developer easier in debugging

Không tải được app momo ở môi trường test

Hiện app momo ở https://test-payment.momo.vn/download/ đang không download được file .apk . Mình đang thử làm việc với momo ở https://test-business.momo.vn/ bằng tài khoản momo cho sẵn. Nhưng do không tải được app momo test nên mình không thanh toán được. Khi dùng bằng app momo ở môi trường thật thì không được vì nó sẽ báo partner chưa được active/create. Ai có cách nào để làm việc với momo ở môi trường test không ạ

[Gin - Golang] - Invalid character 'p' looking for beginning of value

Trong quá trình mình tích hợp app thanh toán momo thì gặp lỗi này.
Khi client quét QR code thanh toán thành công thì Momo sẽ gọi https đến API notify của bên mình.
Nhưng ở bên server mình khi nhận được request và decode thì bị lỗi "Invalid character 'p' looking for beginning of value"

image

Bug report

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

App-in-App integration: payment confirm got issue with hashed signature

Describe the bug
App-in-App integration: payment confirm got issue with hashed [signature]

To Reproduce
Steps to reproduce the behavior:

  1. Got token from MOMO app
  2. Init a payment with pay/app successfully to get a transid
  3. Use the return transid to confirm with pay/confirm
  4. See error Failed: {"status":2129,"message":"Signature không đúng. Vui lòng kiểm tra lại."} please see screenshot for more info

Expected behavior
With a valid signature, the payment should be confirmed successully

Screenshots
https://firebasestorage.googleapis.com/v0/b/moneygroupapp.appspot.com/o/Momo_paymentconfirm_bug.PNG?alt=media&token=19125306-464b-4a63-8c62-763c1a14841d

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Raw signature: partnerCode=MOMOOS6O20201002&partnerRefId=Momo0.16132855516378752&requestType=capture&requestId=b45e23a1-8bde-db35-0a67-b4c537a141c0&momoTransId=2338283079

Hashed signature:
6ba42b0075ac980fad7fdca8f21b3043128c0fbd12cc00cdc43a20bc5dc6bb89

Verified with https://developers.momo.vn/tryitnow/#integrate_key

Signature đúng format và đủ các attribute nhưng Response bị Status: 400, message: Bad format request, resultCode: 20

  • Mình nhận được response có body như này khi gửi request tới test-payment.momo.vn/v2/gateway/api/create
    { "responseTime":1676024530704, "message":"Bad format request.", "resultCode":20, "subErrors":[{ "field":"signature", "message":"Chữ ký không hợp lệ. Vui lòng kiểm tra dữ liệu gốc trước khi mã hóa : accessKey=*****&amount=175000&extraData=&ipnUrl=http://localhost:5000/api/checkout/ipn/momo&orderId=63e61ad2318d66f22ecad8f7&orderInfo=pay with MoMo&partnerCode=MOMO0T1D20220107&redirectUrl=http://localhost:3000/resultMomo&requestId=84f36d78-a97e-4bd2-afb4-5f89cbaac15e&requestType=captureWallet." }] }

  • Mình đã kiểm tra lại các attribute cần có của signature cũng như các field của request body thì thấy ko sai định dạng hoặc thiếu field nào

  • Đây là raw signature của mình (xin phép ẩn accessKey) :
    accessKey=*****&amount=175000&extraData=&ipnUrl=http://localhost:5000/api/checkout/ipn/momo&orderId=63e61ad2318d66f22ecad8f7&orderInfo=pay with MoMo&partnerCode=MOMO0T1D20220107&redirectUrl=http://localhost:3000/resultMomo&requestId=84f36d78-a97e-4bd2-afb4-5f89cbaac15e&requestType=captureWallet

    signature sau khi được mã hóa dạng HmacSHA256 : 2ebbe979d8d28756db1e1214b71ff8100e5c97f0a2e2e2d21ff5742854b5852a

  • Đây là request body của mình trước khi gửi tới API của momo :
    { "partnerCode":"MOMO0T1D20220107", "requestId":"84f36d78-a97e-4bd2-afb4-5f89cbaac15e", "amount":175000, "orderId":"63e61ad2318d66f22ecad8f7", "orderInfo":"pay with MoMo", "redirectUrl":"http://localhost:3000/resultMomo", "ipnUrl":"http://localhost:5000/api/checkout/ipn/momo", "extraData":"", "requestType":"captureWallet", "signature":"2ebbe979d8d28756db1e1214b71ff8100e5c97f0a2e2e2d21ff5742854b5852a", "lang":"vi" }

Getting error 99 or app crash on testing environment

Describe the bug
I'm implementing momo payment for my webapp. However, I keep getting error 99 or the test app would crash when I try to make a test payment.
I made sure to make my payment request to the development server. So I'm not sure why this problem persists while all the fields are correct, and I'm getting the right response.

Would testing on production be different?

To Reproduce
Steps to reproduce the behavior:

  1. Make payment request from my website with the correct body and header.
  2. Redirect to momo payment gateway to scan QR code for authentication.
  3. Using the test app to scan QR code.
  4. See error 99, or the test app crashes.

Expected behavior
Expected to see transaction being processed without error. Or test app would not crash.

Screenshots
it either fails to process, or crash.

photo_2021-01-13_18-20-35

Desktop (please complete the following information):

  • OS: [catalina]
  • Browser [chrome]

Smartphone (please complete the following information):

  • Device: [iPhone6s Plus]
  • OS: [14.3]

Additional context

Refund trong môi trường TEST.

Mình đang tích hợp momo vào một ứng dụng. Đang test thử refund nhưng toàn bị từ chối với respon:

{'responseTime': 1662631226566, 'message': 'Quyền truy cập bị từ chối. Vui lòng liên hệ MoMo để biết thêm chi tiết.', 'resultCode': 11}

Cho mình hỏi lỗi này làm sao khắc phục để mình test thử tính năng refund.

thank you for your helping

double http.request on ruby sample code

....
response = http.request(request)

# Send the request and get the response
puts "SENDING...."
response = JSON.parse(http.request(request).body)
....

@caokhang91

Đăng nhập bằng google, facebook bị crash khi dùng chung với MomoSDK

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Xác thực thanh toán với signature ở Response Url

Hi Momo Devs,
Sau khi tìm hiểu về code mẫu với nodejs.
Thì mình thấy sẽ có 2 signatureRequest UrlResponse Url

  • Request Url
var signature = crypto.createHmac('sha256', secretkey) .update(rawSignature) .digest('hex');

với rawSignature được tạo dưới dạng Query String của các tham số:

var rawSignature = "accessKey="+accessKey+"&amount=" + amount+"&extraData=" + extraData+"&ipnUrl=" + ipnUrl+"&orderId=" + orderId+"&orderInfo=" + orderInfo+"&partnerCode=" + partnerCode +"&redirectUrl=" + redirectUrl+"&requestId=" + requestId+"&requestType=" + requestType 

Response Url cũng có 1 signature. Với mục đích mình sẽ dùng Secret Key cùng các tham số để tạo ra 1 signature sau đó so sánh nếu giống với signature trả về + resulltCode = 0 thì thanh toán thành công.

Mình muốn hỏi

  1. Signature ở response url được tạo ra như thế nào ?
  2. Nếu nó được tạo giống như signature ở request url thì danh sách tham số tạo ra rawSignature là gì ?

Cảm ơn mọi người!

App test không login được

Hi team, mình có cài app test nhưng sau khi nhập số điện thoại thì bị lỗi như hình
Nhờ team kiểm tra nhé

50140902_2293444327354887_7857357572397858816_n

Merchant wallet not receive money

Describe the bug
After the payer accept for payment, the money of payer has been reduce. However, the merchant wallet does not receive the money (already set Wallet number on business page). Furthermore, the resultCode sent back from Check for payment status is 0 (success).

To Reproduce
Steps to reproduce the behavior:

  1. Create payment link with initiate-payment-method
  2. Redirect to the given URL
  3. Pay with QR code
  4. Check for the money on merchant wallet (bug)

Expected behavior
The merchant wallet balance should be increased

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.