Good day everyone. I want to create a payment method via RAPYD Collect. it seems the API needs wallets Id. Now I want to create wallets.
Am trying to create a wallet so that I can start making payments via Collects. Am using php. here is my question:
1.) please where can I get utilities.php files as requested in create wallets codes here.
2.) Where can I set my secret and access key because its not specified in the code sample below.
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/<path-to-your-utility-file>/utilities.php";
include($path);
$body = [
'first_name' => 'John',
'last_name' => 'Doe',
'email' => '',
'ewallet_reference_id' => 'John-Doe-02152020',
'metadata' => [
'merchant_defined' => true
],
'phone_number' => '',
'type' => 'person',
'contact' => [
'phone_number' => '+14155551234',
'email' => 'johndoe@rapyd.net',
'first_name' => 'John',
'last_name' => 'Doe',
'mothers_name' => 'Jane Smith',
'contact_type' => 'personal',
'address' => [
'name' => 'John Doe',
'line_1' => '123 Main Street',
'line_2' => '',
'line_3' => '',
'city' => 'Anytown',
'state' => 'NY',
'country' => 'US',
'zip' => '12345',
'phone_number' => '+14155551234',
'metadata' => [],
'canton' => '',
'district' => '',
],
'identification_type' => 'PA',
'identification_number' => '1234567890',
'date_of_birth' => '11/22/2000',
'country' => 'US',
'metadata' => [
'merchant_defined' => true
],
],
];
try {
$object = make_request('post', '/v1/user', $body);
var_dump($object);
} catch(Exception $e) {
echo "Error: $e";
}
?>