-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshopping_cart_payment.php
55 lines (38 loc) · 1.21 KB
/
shopping_cart_payment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
require_once 'config.php';
require_once 'soapconfig.php';
$customer=$_REQUEST['customer_id'];
$po_number=$_REQUEST['po_number'];
$method=$_REQUEST['method'];
$cc_cid=$_REQUEST['cc_cid'];
$cc_owner=$_REQUEST['cc_owner'];
$cc_type=$_REQUEST['cc_type'];
$cc_exp_year=$_REQUEST['cc_exp_year'];
$storeId=1;
Mage::app();
Mage::app()->getTranslator()->init('frontend');
$cust = Mage::getModel('customer/customer')->load($customer);
$quote = Mage::getModel('sales/quote')->loadByCustomer($cust);
$quote_id=$quote->getId();
//print_r($quote_id);exit;
try
{
$result = $proxy->shoppingCartPaymentMethod($sessionId, $quote_id, array(
'po_number' => $po_number,
'method' => $method,
'cc_cid' => $cc_cid,
'cc_owner' => $cc_owner,
'cc_number' =>$cc_number ,
'cc_type' =>$cc_type ,
'cc_exp_year' => $cc_exp_year,
'cc_exp_month' => $cc_exp_month
), $storeId);
$ret=$result;
}
catch (Exception $e) {
$message = $e->getMessage();
$ret=$message ;
echo json_encode(array('sucess'=>"true",'message'=>$ret),JSON_PRETTY_PRINT);
}
echo json_encode(array('sucess'=>"true",'message'=>$ret),JSON_PRETTY_PRINT);
?>