贝宝支付方式的借记卡和信用卡使用php


paypal payment method for debit and credit card using php

我在我的网站上集成了Paypal REST API(REST-API-sdk-php)支付网关。使用借记卡和信用卡支付。我用沙盒测试了一下,效果很好。我的实时凭据处于挂起状态以直接访问卡的部分原因。

            //paypal
            $cc_first_name      = (isset($_POST['card_holder_name']))? $_POST['card_holder_name'] : die("First Name Empty");
            $cc_last_name       = (isset($_POST["card_holder_last_name"]))? $_POST["card_holder_last_name"] : die("Last Name Empty");
            $cc_card_type       = (isset($_POST["credit_card_type"]))? $_POST["credit_card_type"] : die("Credit Card type Empty");
            $cc_card_number     = (isset($_POST['card_number']))? $_POST['card_number'] : die("Credit Card Number Empty");
            $cc_card_month      = (isset($_POST['expiry_month']))? $_POST['expiry_month'] : die("Expire Month Empty");
            $cc_card_year       = (isset($_POST['expiry_year']))? $_POST['expiry_year'] : die("Expire Year Empty");
            $cc_card_cvv2       = (isset($_POST['cvvCode']))? $_POST['cvvCode'] : die("CVV month empty");
            //paypal        

if($_POST["payment_method"] == "credit_card"){
    $credit_card = array(
        'type'=> $cc_card_type, 
        'number' => $cc_card_number, 
        'expire_month'=>$cc_card_month, 
        'expire_year'=>$cc_card_year, 
        'cvv2'=>$cc_card_cvv2,
        'first_name'=>$cc_first_name,
        'last_name'=>$cc_last_name
        );
    //pay directly using credit card information.
    $result = pay_direct_with_credit_card($credit_card, PP_CURRENCY , $total_amount, $items, '') ;
}

在那个api代码中,它只使用信用卡进行检查。他们不使用任何功能来接受借记卡。我需要的是。这个代码片段可以接受借记卡付款吗?

只要它在Live环境中有效,它应该对借记卡起同样的作用。