Php Magento信用卡号与信用卡类型不匹配异常

Php Magento信用卡号与信用卡类型不匹配异常,php,magento,soap,stripe-payments,credit-card,Php,Magento,Soap,Stripe Payments,Credit Card,我在我的magento商店的网站上使用条纹信用卡支付方式,并开发了一个移动应用程序。我正在使用原生MagentoAPI开发api。问题发生在创建订单api上,在为条带信用卡添加付款之前,一切正常,但当我点击创建订单api时,它抛出异常。 “信用卡号与信用卡类型不匹配异常” 下面是api代码,请分享您对此问题的知识。提前谢谢 $proxy = new SoapClient($this->_client); //soap handle $sessionId = $proxy->l

我在我的magento商店的网站上使用条纹信用卡支付方式,并开发了一个移动应用程序。我正在使用原生MagentoAPI开发api。问题发生在创建订单api上,在为条带信用卡添加付款之前,一切正常,但当我点击创建订单api时,它抛出异常。 “信用卡号与信用卡类型不匹配异常”

下面是api代码,请分享您对此问题的知识。提前谢谢

$proxy = new SoapClient($this->_client); //soap handle
    $sessionId = $proxy->login($this->_apiuser, $this->_apikey);
    $resultCustomerAddresses = $proxy->call($sessionId, "cart_customer.addresses", array($shoppingCartId, $arrAddresses));
    if ($resultCustomerAddresses != TRUE) 
    {
       return json_encode(array('status' => 0, 'result' => array(),'message' => 'Error in saving  address'));
    } 
    $resultShippingMethods = $proxy->call($sessionId, "cart_shipping.list", array($shoppingCartId));
    $randShippingMethodIndex = rand(0, count($resultShippingMethods)-1 );
    $shippingMethod = $resultShippingMethods[$randShippingMethodIndex]["code"];

    $resultShippingMethod = $proxy->call($sessionId, "cart_shipping.method", array($shoppingCartId, $shipping_method));

    //$resultTotalOrder = $proxy->call($sessionId,'cart.totals',array($shoppingCartId));

    $paymentMethod = array(
        "method" => $payment_method
    );

    $resultPaymentMethod = $proxy->call($sessionId, "cart_payment.method", array($shoppingCartId, $payment_method));

    $licenseForOrderCreation = null;

    $resultOrderCreation = $proxy->call($sessionId,"cart.order",array($shoppingCartId, null, $licenseForOrderCreation));

我遇到了同样的问题并成功地解决了它,请参见以下答案:

基本上,您在保存报价之前提供卡片信息。它将根据regex模式和配置的购买限额验证卡,并确保您可以使用付款方式

然后它会忘记付款信息

因此,在您告诉它提交订单之前,您需要再次提供卡信息


我的解决方案是在前端应用程序上为简化而定制的端点,它使我能够在保存报价和提交订单之间将卡片信息保存在内存中以重新保存。

虽然这理论上可以回答这个问题,但它将在这里,并提供链接供参考。谢谢Stephen,我扩展了答案。