Skip to content

Commit

Permalink
Merge pull request conekta#18 from conekta/feature/add-orders
Browse files Browse the repository at this point in the history
set plugin
  • Loading branch information
Fernando Ruiz authored Dec 26, 2016
2 parents 6110f51 + 1d5a15d commit 0f1ef9e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conektaprestashop.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,13 @@ public function processPayment($token, $type, $monthly_installments)

require_once(dirname(__FILE__) . '/lib/conekta-php/lib/Conekta.php');

Conekta::setApiKey(Configuration::get('CONEKTA_MODE') ? Configuration::get('CONEKTA_PRIVATE_KEY_LIVE') : Configuration::get('CONEKTA_PRIVATE_KEY_TEST'));
\Conekta\Conekta::setApiKey(Configuration::get('CONEKTA_MODE') ? Configuration::get('CONEKTA_PRIVATE_KEY_LIVE') : Configuration::get('CONEKTA_PRIVATE_KEY_TEST'));
\Conekta\Conekta::setPlugin('Prestashop');

$cart = $this->context->cart;
$customer = new Customer((int) $cart->id_customer);
$cart = $this->context->cart;
$customer = new Customer((int) $cart->id_customer);
$address_delivery = new Address((int) $cart->id_address_delivery);
$address_fiscal = new Address((int) $cart->id_address_invoice);
$address_fiscal = new Address((int) $cart->id_address_invoice);

// get shipping info

Expand Down Expand Up @@ -520,7 +521,6 @@ public function processPayment($token, $type, $monthly_installments)
"phone" => $address_fiscal->phone,
"address" => array(
"street1" => $address_fiscal->address1,
// "external_number" => 0,
"city" => $address_fiscal->city,
"country" => $address_fiscal->country,
"zip" => $address_fiscal->postcode,
Expand Down

0 comments on commit 0f1ef9e

Please sign in to comment.