Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

onsoftAdilsonjose's avatar

Can anybody help me connect This Api To Mylaravel shopping Cart For Payment

https://developer.proxypay.co.ao/v2/?php# Iwant to use in My laravel Project and am Kind of Lost where to Start. If you have experience Working With API apreciate if look at this Link .. This Api for payment ..here in my country(Angola) we actualy dont use Visa Payment anymore if you want to buy something Online This is the only PaymentMethod That we have..

Any Advice will be apreciated... Thankx in Advance!!

0 likes
2 replies
bugsysha's avatar

Have you even looked at the docs or tried something?

<?php
$reference = [
    "amount"        => "9701.84",
    "end_datetime"  => "2018-12-31",
    "custom_fields" => [
      "invoice" => "2018/0333"
    ]
];

$data = json_encode($reference);

$curl = curl_init();

$httpHeader = [
    "Authorization: " . "Token " . "reh8inj33o3algd2tpi6tkcnrqf8rjj2",
    "Accept: application/vnd.proxypay.v2+json",
    "Content-Type: application/json",
    "Content-Length: " . strlen($data)
];

$opts = [
    CURLOPT_URL             => "https://api.proxypay.co.ao/references/904800000",
    CURLOPT_CUSTOMREQUEST   => "PUT",
    CURLOPT_HTTP_VERSION    => CURL_HTTP_VERSION_1_1,
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_TIMEOUT         => 30,
    CURLOPT_HTTPHEADER      => $httpHeader,
    CURLOPT_POSTFIELDS      => $data
];

curl_setopt_array($curl, $opts);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);
onsoftAdilsonjose's avatar

yes i took look Bt the only problem that have i never work with Api ..... i have problem how to setup the configuration in laravel ...i have no Glue....

Please or to participate in this conversation.