Magento 中的信用卡详细信息
如何从 OnepageController.php
获取 Magento 中的信用卡详细信息? 我已经检索了所有其他信息,例如账单信息、运输信息和用户详细信息。我使用以下命令获取卡片详细信息,但它返回空白:
$lastQuoteId = $session->getLastQuoteId();
$lastOrderId = $session->getLastOrderId();
$order = Mage::getModel('sales/order')->load($lastOrderId);
$card_exp_month = $order->getCcExpMonth($lastOrderId);///(Nahi AAya)
$card_exp_year = $order->getCcExpYear($lastOrderId);///(Nahi AAya)
当我打印 $card_exp_month
和 $card_exp_year
时,两者都是空白。还有其他方法可以确定信用卡详细信息吗?我正在查找 CC 号码、到期年份和到期月份。
How can I get the credit card detail in Magento from OnepageController.php
?
I have retrieved all the other information like billing information, shipping information and user details. I am using the following to get the card detail but it returns blank:
$lastQuoteId = $session->getLastQuoteId();
$lastOrderId = $session->getLastOrderId();
$order = Mage::getModel('sales/order')->load($lastOrderId);
$card_exp_month = $order->getCcExpMonth($lastOrderId);///(Nahi AAya)
$card_exp_year = $order->getCcExpYear($lastOrderId);///(Nahi AAya)
When I print $card_exp_month
and $card_exp_year
, both are blank. Is there another way by which I can determine the credit card detail? I'm looking for CC number, expiry year and expiry month.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我在 phtml 文件中获取了卡片详细信息,如下所示。
I got the card details in phtml file like following way.
还有
CcCid、CcOwner 等......
Also
and so on for CcCid, CcOwner, etc...
尝试使用
$order->getPayment()->getCcExpMonth($lastOrderId)
,而不是$order->getCcExpMonth($lastOrderId)
。使用
print_r($order->getPayment()->debug())
查看其他可用值,或查看sales_flat_order_ payment
表以查看更多示例。Instead of
$order->getCcExpMonth($lastOrderId)
try$order->getPayment()->getCcExpMonth($lastOrderId)
.Use
print_r($order->getPayment()->debug())
to see what other values are available, or view thesales_flat_order_payment
table to see some more examples.抄送最后 4 个:
$order->getPayment()->getCcLast4()
费用信息:
$order->getPayment()->getCcExpMonth()
$order->getPayment()->getCcExpYear()
CC Last 4:
$order->getPayment()->getCcLast4()
Exp Info:
$order->getPayment()->getCcExpMonth()
$order->getPayment()->getCcExpYear()