PayPal mc_gross 格式编号? [英] PayPal mc_gross format number?
本文介绍了PayPal mc_gross 格式编号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个 php ipn 脚本.但我被困在 mc_gross 支票上.
I'm working on an php ipn script. but i'm stuck on mc_gross check.
我以这种格式(不是数字格式)将金额存储在数据库中:
I store the amounts in database in this format (not number format):
1000
100
10000
paypal 如何将 mc_gross 值发回给我?数字格式?我的意思是这样的:
How paypal send back to me the mc_gross value? in number format? i mean like this:
1,000
100
10,000
因为如果我以这种格式存储金额并且贝宝将格式以数字格式发送给我,我将进行不相等的操作
Coz if i store amounts in that format and paypal send the format back to me in number formats i'll have an not equal operation
1000 == 1,000 - false
所以我需要验证我的存储金额 si 是否与 paypal 寄给我的 mc_gross 相同.
So i need to verify if my stored amount si the same as mc_gross that paypal sends me back.
推荐答案
一个选项:
if($my_val== intval(str_replace(',', '', $pay_pal_val)){
//alll good
}
这篇关于PayPal mc_gross 格式编号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文