burdaki api çıktısına nasıl ulaşabilirim ?
Öncelikle selamun aleykum bir tane ödeme sistemi buldum php ile bu şekilde
bir çıktı veriyor bu verilere nasıl ulaşabilirim çıktı json formatında değildir..
weepayModelCreatePaymentRequestThreeDInitialize Object
(
[threeDSecureUrl:weepayModelCreatePaymentRequestThreeDInitializeResource:private] =>
[status:weepayweepayResource:private] => failure
[errorCode:weepayweepayResource:private] => 130
[message:weepayweepayResource:private] => Kart bilgilerinde hata var
[error:weepayweepayResource:private] =>
[locale:weepayweepayResource:private] =>
[systemTime:weepayweepayResource:private] =>
[rawResult:weepayApiResource:private] => {"status":"failure","message":"Kart bilgilerinde hata var","errorCode":"130"}
)
kodu yazmayı unutmusum
//https://github.com/weepay/weepay-php PHP lib.
// composer or weepay initialize Bootstrap
// Auth
$options = new weepayAuth();
$options->setBayiID("xxxxxx");// weepay tarafıdan verilen bayiId
$options->setApiKey("xxxx-xxxx-xxx");// weepay tarafıdan verilen apiKey
$options->setSecretKey("xxxxxxx-xxxxxxxxx-xx-xx"); // weepay tarafıdan verilen secretKey
$options->setBaseUrl("https://api.weepay.co");
//Request
$request = new weepayRequestCreatePaymentRequest();
$request->setOrderId('1298');
$request->setIpAddress('192.168.2.1');
$request->setPrice(35.50);
$request->setCurrency(weepayModelCurrency::TL);
$request->setLocale(weepayModelLocale::TR);
$request->setDescription('Açıklama Alanı');
$request->setCardHolderName("isim soyisim");
$request->setCardNumber("555555555555555");
$request->setEpireMonth("01");
$request->setExpireYear("22");
$request->setCvcNumber("233");
$request->setInstallmentNumber(1);
$request->setPaymentGroup(weepayModelPaymentGroup::PRODUCT);
$request->setPaymentChannel(weepayModelPaymentChannel::WEB);
//Customer
$customer = new weepayModelCustomer();
$customer->setCustomerId(1235); // Üye işyeri müşteri Id
$customer->setCustomerName("isim"); //Üye işyeri müşteri ismi
$customer->setCustomerSurname("soyisim"); //Üye işyeri müşteri Soyisim
$customer->setGsmNumber("50XXXXXX"); //Üye işyeri müşteri Cep Tel
$customer->setEmail("[email protected]"); //Üye işyeri müşteri ismi
$customer->setIdentityNumber("00032222721"); //Üye işyeri müşteri TC numarası
$customer->setCity("istanbul"); //Üye işyeri müşteri il
$customer->setCountry("turkey");//Üye işyeri müşteri ülke
$request->setCustomer($customer);
//Adresler
// Fatura Adresi
$BillingAddress = new weepayModelAddress();
$BillingAddress->setContactName("isim soyisim");
$BillingAddress->setAddress("Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27");
$BillingAddress->setCity("istanbul");
$BillingAddress->setCountry("turkey");
$BillingAddress->setZipCode("34164");
$request->setBillingAddress($BillingAddress);
//Kargo / Teslimat Adresi
$ShippingAddress = new weepayModelAddress();
$ShippingAddress->setContactName("isim soyisim");
$ShippingAddress->setAddress("Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27");
$ShippingAddress->setCity("istanbul");
$ShippingAddress->setCountry("turkey");
$ShippingAddress->setZipCode("34164");
$request->setShippingAddress($ShippingAddress);
// Sipariş Ürünleri
$Products = array();
// Birinci Ürün
$firstProducts = new weepayModelProduct();
$firstProducts->setName("Ürün Bir");
$firstProducts->setProductId(12344);
$firstProducts->setProductPrice(0.10);
$firstProducts->setItemType(weepayModelProductType::PHYSICAL);
$Products[0] = $firstProducts;
// İkinci Ürün
$secondProducts = new weepayModelProduct();
$secondProducts->setName("Ürün İki");
$secondProducts->setProductId("C550A100");
$secondProducts->setProductPrice(0.10);
$secondProducts->setItemType(weepayModelProductType::PHYSICAL);
$Products[1] = $secondProducts;
// Üçüncü Ürün
$thirdProducts = new weepayModelProduct();
$thirdProducts->setName("Ürün Üç");
$thirdProducts->setProductId("1000");
$thirdProducts->setProductPrice("0.10");
$thirdProducts->setItemType(weepayModelProductType::PHYSICAL);
$Products[2] = $thirdProducts;
$request->setProducts($Products);
$createPaymentRequest = weepayModelCreatePaymentRequestInitialize::create($request, $options);
echo "<pre>";
print_r($createPaymentRequest);
echo "</pre>";