|
1 | 1 | # Laravel Payment Methods
|
2 |
| -[](https://travis-ci.org/joemccann/dillinger) [](https://packagist.org/packages/shabayek/laravel-payment) [](https://packagist.org/packages/shabayek/laravel-payment) |
| 2 | +[](https://travis-ci.org/joemccann/dillinger) [](https://packagist.org/packages/shabayek/laravel-payment) [](https://packagist.org/packages/shabayek/laravel-payment)   |
3 | 3 |
|
4 | 4 | Laravel payment package handle all payment methods.
|
5 | 5 |
|
@@ -52,6 +52,19 @@ class User extends Authenticatable implements CustomerContract
|
52 | 52 | }
|
53 | 53 | ```
|
54 | 54 |
|
| 55 | +- You can insert user model object that implements **CustomerContract** or array |
| 56 | + |
| 57 | +```php |
| 58 | + $payment->customer($user); |
| 59 | + // OR array |
| 60 | + $payment->customer([ |
| 61 | + 'first_name' => 'John', |
| 62 | + 'last_name' => 'Doe', |
| 63 | + |
| 64 | + 'phone' => '09123456789', |
| 65 | + ]); |
| 66 | +``` |
| 67 | + |
55 | 68 | - Implement address details contracts on address model
|
56 | 69 |
|
57 | 70 | ```php
|
@@ -79,6 +92,32 @@ class Address extends Model implements AddressContract
|
79 | 92 | }
|
80 | 93 | ```
|
81 | 94 |
|
| 95 | +- You enter address model object that implements **AddressContract** array of data |
| 96 | +```php |
| 97 | + $payment->address($address); |
| 98 | + // OR array |
| 99 | + $payment->address([ |
| 100 | + "apartment" => "803", |
| 101 | + "floor" => "42", |
| 102 | + "street" => "Ethan Land", |
| 103 | + "building" => "8028", |
| 104 | + "postal_code" => "01898", |
| 105 | + "city" => "Jaskolskiburgh", |
| 106 | + "country" => "CR", |
| 107 | + "state" => "Utah" |
| 108 | + ]); |
| 109 | +``` |
| 110 | + |
| 111 | +- Add items with loop array of data items |
| 112 | +```php |
| 113 | + $payment->items([ |
| 114 | + "name" => "ASC1515", |
| 115 | + "amount_cents" => "500000", |
| 116 | + "description" => "Smart Watch", |
| 117 | + "quantity" => "1" |
| 118 | + ]); |
| 119 | +``` |
| 120 | + |
82 | 121 | - Check the payment is online to get pay url
|
83 | 122 |
|
84 | 123 | ```php
|
|
0 commit comments