A vanilla flavoured Aktiv-Merchant with just the necessary changes made to support PayPal Express:
$gateway = new Merchant_Billing_PaypalExpress(
array(
'login' => $nopconfig['cart.paymentgateway']['paypal.api.username'],
'password' => $nopconfig['cart.paymentgateway']['paypal.api.password'] ,
'signature' => $nopconfig['cart.paymentgateway']['paypal.api.signature'],
'currency' => 'GBP'
)
);
with a credit card array:
# Create a credit card object if you need it.
$credit_card = new Merchant_Billing_CreditCard(
array(
"first_name" => $_POST['firstname'],
"last_name" => $_POST['lastname'],
"number" => $_POST['ccnumber'],
"month" => $_POST['client_cardexpmth'],
"year" => $_POST['client_cardexpyr'],
"verification_value" => $_POST['cvv']
)
);
generates the following PHP error:
[02-Feb-2012 09:40:24] PHP Fatal error: Cannot use object of type Merchant_Billing_CreditCard as array in D:\Webroot\theleatherworker.com\includes\classes\merchant\merchant\billing\gateways\PaypalExpress.php on line 117
Using print_r to get some feedback on the screen, I get:
Merchant_Billing_CreditCard Object ( [first_name] => Mark [last_name] => Richards [month] => 08 [year] => 2015 [type] => visa [number] => 4295369404352770 [verification_value] => 333 [start_month] => [start_year] => [issue_number] => [errors:Merchant_Billing_CreditCard:private] => Merchant_Error Object ( [errors:Merchant_Error:private] => Array ( ) ) [require_verification_value] => 1 )
If Aktiv Merchant is supposed to be generic what is happening?